mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2025-04-07 13:32:44 +02:00
default to BUILD_TESTING=ON if the engine is built as a root project
This commit is contained in:
parent
ec98df52d7
commit
b0e065e2ef
@ -19,6 +19,12 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
|||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||||
|
|
||||||
|
# enable test
|
||||||
|
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
||||||
|
include(CTest)
|
||||||
|
#enable_testing()
|
||||||
|
endif()
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/mm_options_and_defines.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/mm_options_and_defines.cmake")
|
||||||
|
|
||||||
# external libs
|
# external libs
|
||||||
@ -47,10 +53,6 @@ elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (BUILD_TESTING)
|
|
||||||
enable_testing()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# cmake setup end
|
# cmake setup end
|
||||||
|
|
||||||
# MM code
|
# MM code
|
||||||
|
@ -25,4 +25,3 @@ if(BUILD_TESTING)
|
|||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user