mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2024-12-04 19:23:28 +01: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_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")
|
||||
|
||||
# external libs
|
||||
@ -47,10 +53,6 @@ elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BUILD_TESTING)
|
||||
enable_testing()
|
||||
endif()
|
||||
|
||||
# cmake setup end
|
||||
|
||||
# MM code
|
||||
|
@ -25,4 +25,3 @@ if(BUILD_TESTING)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user