Browse Source

build system: avoid enabling tests by default when EnTT is the top dir project

Michele Caini 5 years ago
parent
commit
d6d0cdf9aa
1 changed files with 1 additions and 6 deletions
  1. 1 6
      CMakeLists.txt

+ 1 - 6
CMakeLists.txt

@@ -33,11 +33,6 @@ project(
     LANGUAGES CXX
 )
 
-set(MAIN_PROJECT OFF)
-if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
-    set(MAIN_PROJECT ON)
-endif()
-
 if(NOT CMAKE_BUILD_TYPE)
     set(CMAKE_BUILD_TYPE Debug)
 endif()
@@ -153,7 +148,7 @@ export(PACKAGE EnTT)
 # Tests
 #
 
-option(ENTT_BUILD_TESTING "Enable building tests." ${MAIN_PROJECT})
+option(ENTT_BUILD_TESTING "Enable building tests." OFF)
 
 if(ENTT_BUILD_TESTING)
     option(ENTT_FIND_GTEST_PACKAGE "Enable finding gtest package." OFF)