Просмотр исходного кода

build: rework the tests vs testbed part

skypjack 4 дней назад
Родитель
Сommit
49a2c61ae6
2 измененных файлов с 25 добавлено и 17 удалено
  1. 25 16
      CMakeLists.txt
  2. 0 1
      TODO

+ 25 - 16
CMakeLists.txt

@@ -343,28 +343,37 @@ if(ENTT_INSTALL)
     export(PACKAGE EnTT)
     export(PACKAGE EnTT)
 endif()
 endif()
 
 
-# Tests and testbed
+# Tests
 
 
 option(ENTT_BUILD_TESTING "Enable building tests." OFF)
 option(ENTT_BUILD_TESTING "Enable building tests." OFF)
-option(ENTT_BUILD_TESTBED "Enable building testbed." OFF)
 
 
-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_20 CACHE STRING "C++ standard revision to use for tests and testbed")
+if(ENTT_BUILD_TESTING)
+    set(ENTT_ID_TYPE std::uint32_t CACHE STRING "Type of identifiers to use for tests")
+    set(ENTT_CXX_STD cxx_std_20 CACHE STRING "C++ standard revision to use for tests")
 
 
-    # Tests and testbed do not work together because SDL gets confused with EnTT tests
-    if(ENTT_BUILD_TESTING)
-        option(ENTT_FIND_GTEST_PACKAGE "Enable finding gtest package." OFF)
+    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)
+    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)
     
     
-        include(CTest)
-        enable_testing()
-        add_subdirectory(test)
-    elseif(ENTT_BUILD_TESTBED)
+    include(CTest)
+    enable_testing()
+    add_subdirectory(test)
+endif()
+
+# Testbed
+
+option(ENTT_BUILD_TESTBED "Enable building testbed." OFF)
+
+if(ENTT_BUILD_TESTBED)
+    if(ENTT_BUILD_TESTING)
+        message(VERBOSE "Tests and testbed do not work together because SDL gets confused with EnTT tests")
+    else()
+        set(ENTT_ID_TYPE std::uint32_t CACHE STRING "Type of identifiers to use for testbed")
+        set(ENTT_CXX_STD cxx_std_20 CACHE STRING "C++ standard revision to use for testbed")
+
         add_subdirectory(testbed)
         add_subdirectory(testbed)
     endif()
     endif()
 endif()
 endif()

+ 0 - 1
TODO

@@ -16,7 +16,6 @@ TODO:
 * built-in no-pagination storage - no_pagination page size as limits::max
 * built-in no-pagination storage - no_pagination page size as limits::max
 * any cdynamic to support const ownership construction
 * any cdynamic to support const ownership construction
 * meta non-const allow_cast overloads: (const int &) to (int &) is not allowed, but (const int &) to (double &) is allowed (support only for convertibles)
 * meta non-const allow_cast overloads: (const int &) to (int &) is not allowed, but (const int &) to (double &) is allowed (support only for convertibles)
-* review build process for testbed (i.e. tests first due to SDL)
 * paged vector as a standalone class
 * paged vector as a standalone class
 * resource: shared_from_this?
 * resource: shared_from_this?
 * archetype-like a-là EnTT support (see my own notes)
 * archetype-like a-là EnTT support (see my own notes)