diff --git a/CMakeLists.txt b/CMakeLists.txt index 5fc99e7..4675c97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/framework/common_components/CMakeLists.txt b/framework/common_components/CMakeLists.txt index ef21f4d..042709c 100644 --- a/framework/common_components/CMakeLists.txt +++ b/framework/common_components/CMakeLists.txt @@ -25,4 +25,3 @@ if(BUILD_TESTING) add_subdirectory(test) endif() -