@ -1,20 +1,6 @@
# T h i s i s t h e t o p - l e v e l C M a k e L i s t s . t x t f i l e f o r t h e C u b e r i t e p r o j e c t
#
# U s e C M a k e t o g e n e r a t e t h e b u i l d f i l e s f o r y o u r p l a t f o r m
#
# T h i s s c r i p t s u p p o r t s s o m e c o n f i g u r a t i o n t h r o u g h C M a k e arguments ( -Dparam=val syntax ) :
# B U I L D _ T O O L S = 1 s e t s u p a d d i t i o n a l e x e c u t a b l e s t o b e b u i l t a l o n g w i t h t h e server ( ProtoProxy, GrownBiomeGenVisualiser, MCADefrag )
# B U I L D _ U N S T A B L E _ T O O L S = 1 s e t s u p y e t m o r e e x e c u t a b l e s t o b e b u i l t , t h e s e c a n b e b r o k e n a n d g e n e r a l l y a r e obsolete ( GeneratorPerformanceTest )
# N O _ N A T I V E _ O P T I M I Z A T I O N = 1 d i s a b l e s C P U - s p e c i f i c o p t i m i s a t i o n s f o r t h e c u r r e n t m a c h i n e , a l l o w s u s e o n o t h e r C P U s o f t h e s a m e p l a t f o r m
# D I S A B L E _ S Y S T E M _ L U A = 1 d i s a b l e s t h e u s e o f s y s t e m L u a i n t e r p r e t e r ; t h e t o l u a e x e c u t a b l e w i l l b e b u i l t a n d u s e d i n s t e a d . I n c o m p a t i b l e w i t h c r o s s - c o m p i l i n g
# S E L F _ T E S T = 1 e n a b l e s t e s t i n g c o d e t o b e b u i l t
# U N I T Y _ B U I L D S = O F F d i s a b l e s u n i t y b u i l d s
# P R E C O M P I L E _ H E A D E R S = O F F d i s a b l e s p r e c o m p i l e d h e a d e r s
# W H O L E _ P R O G R A M _ O P T I M I S A T I O N = O F F d i s a b l e s l i n k t i m e o p t i m i s a t i o n
cmake_minimum_required ( VERSION 3.13 )
cmake_policy ( VERSION 3.13...3.17.2 )
@ -26,10 +12,12 @@ project(
)
option ( BUILD_TOOLS "Sets up additional executables to be built along with the server" OFF )
option ( WHOLE_PROGRAM_OPTIMISATION "Enables link time optimisation for Release" ON )
option ( BUILD_UNSTABLE_TOOLS "Sets up yet more executables to be built, these can be broken and generally are obsolete" OFF )
option ( NO_NATIVE_OPTIMIZATION "Disables CPU-specific optimisations for the current machine, allows use on other CPUs of the same platform" OFF )
option ( PRECOMPILE_HEADERS "Enable precompiled headers for faster builds" ON )
option ( SELF_TEST "Enables testing code to be built" OFF )
option ( UNITY_BUILDS "Enables source aggregation for faster builds" ON )
option ( WHOLE_PROGRAM_OPTIMISATION "Enables link time optimisation for Release" ON )
include ( "CMake/AddDependencies.cmake" )
include ( "CMake/Fixups.cmake" )
@ -91,22 +79,22 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set_source_files_properties ( "${PROJECT_SOURCE_DIR}/src/Bindings/Bindings.cpp" PROPERTIES COMPILE_OPTIONS -w )
endif ( )
if ( ${ BUILD_TOOLS } )
message ( "Building tools" )
if ( BUILD_TOOLS )
message ( STATUS "Building tools" )
add_subdirectory ( Tools/GrownBiomeGenVisualiser/ )
add_subdirectory ( Tools/MCADefrag/ )
add_subdirectory ( Tools/NoiseSpeedTest/ )
add_subdirectory ( Tools/ProtoProxy/ )
endif ( )
if ( ${ BUILD_UNSTABLE_TOOLS } )
message ( "Building unstable tools" )
if ( BUILD_UNSTABLE_TOOLS )
message ( STATUS "Building unstable tools" )
add_subdirectory ( Tools/GeneratorPerformanceTest/ )
endif ( )
# S e l f T e s t M o d e e n a b l e s e x t r a c h e c k s a t s t a r t u p
if ( ${ SELF_TEST } )
message ( "Tests enabled" )
if ( SELF_TEST )
message ( STATUS "Tests enabled" )
enable_testing ( )
add_subdirectory ( tests )
endif ( )