|
|
@@ -310,32 +310,31 @@ if(ENTT_INSTALL)
|
|
|
export(PACKAGE EnTT)
|
|
|
endif()
|
|
|
|
|
|
-# Tests
|
|
|
+# Tests and testbed
|
|
|
|
|
|
option(ENTT_BUILD_TESTING "Enable building tests." OFF)
|
|
|
+option(ENTT_BUILD_TESTBED "Enable building testbed." OFF)
|
|
|
|
|
|
-if(ENTT_BUILD_TESTING)
|
|
|
- option(ENTT_FIND_GTEST_PACKAGE "Enable finding gtest package." OFF)
|
|
|
-
|
|
|
- option(ENTT_BUILD_BENCHMARK "Build benchmark." OFF)
|
|
|
- option(ENTT_BUILD_EXAMPLE "Build examples." OFF)
|
|
|
- option(ENTT_BUILD_LIB "Build lib tests." OFF)
|
|
|
- option(ENTT_BUILD_SNAPSHOT "Build snapshot test with Cereal." OFF)
|
|
|
-
|
|
|
- set(ENTT_ID_TYPE std::uint32_t CACHE STRING "Type of identifiers to use for the tests")
|
|
|
- set(ENTT_CXX_STD cxx_std_17 CACHE STRING "C++ standard revision to use for the tests")
|
|
|
+if(ENTT_BUILD_TESTING OR ENTT_BUILD_TESTBED)
|
|
|
+ set(ENTT_ID_TYPE std::uint32_t CACHE STRING "Type of identifiers to use for tests and testbed")
|
|
|
+ set(ENTT_CXX_STD cxx_std_17 CACHE STRING "C++ standard revision to use for tests and testbed")
|
|
|
|
|
|
- include(CTest)
|
|
|
- enable_testing()
|
|
|
- add_subdirectory(test)
|
|
|
-endif()
|
|
|
+ if(ENTT_BUILD_TESTING)
|
|
|
+ option(ENTT_FIND_GTEST_PACKAGE "Enable finding gtest package." OFF)
|
|
|
|
|
|
-# Testbed
|
|
|
+ option(ENTT_BUILD_BENCHMARK "Build benchmark." OFF)
|
|
|
+ option(ENTT_BUILD_EXAMPLE "Build examples." OFF)
|
|
|
+ option(ENTT_BUILD_LIB "Build lib tests." OFF)
|
|
|
+ option(ENTT_BUILD_SNAPSHOT "Build snapshot test with Cereal." OFF)
|
|
|
|
|
|
-option(ENTT_BUILD_TESTBED "Enable building testbed." OFF)
|
|
|
+ include(CTest)
|
|
|
+ enable_testing()
|
|
|
+ add_subdirectory(test)
|
|
|
+ endif()
|
|
|
|
|
|
-if(ENTT_BUILD_TESTBED)
|
|
|
- add_subdirectory(testbed)
|
|
|
+ if(ENTT_BUILD_TESTBED)
|
|
|
+ add_subdirectory(testbed)
|
|
|
+ endif()
|
|
|
endif()
|
|
|
|
|
|
# Documentation
|