Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Fixed extras installation and shard impl location

Commit
6783411349db5a87718c9b7ba8b02e90e39d783e
Author
Bob Miller ·
Committer
Martin Hořeňovský
Parents
7b4dd326c0cf

Files · Download .tar.gz

Changes

 CMakeLists.txt               |  2 ++
 extras/CatchShardTests.cmake | 10 +++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6d381d8d..b3e81153 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -148,6 +148,8 @@ if (NOT_SUBPROJECT)
             "extras/ParseAndAddCatchTests.cmake"
             "extras/Catch.cmake"
             "extras/CatchAddTests.cmake"
+            "extras/CatchShardTests.cmake"
+            "extras/CatchShardTestsImpl.cmake"
           DESTINATION
             ${CATCH_CMAKE_CONFIG_DESTINATION}
         )
diff --git a/extras/CatchShardTests.cmake b/extras/CatchShardTests.cmake
index 5e043cf0..68228f5a 100644
--- a/extras/CatchShardTests.cmake
+++ b/extras/CatchShardTests.cmake
@@ -46,7 +46,7 @@ function(catch_add_sharded_tests TARGET)
     APPEND PROPERTY TEST_INCLUDE_FILES "${ctest_include_file}"
   )
 
-  set(shard_impl_script_file "${CMAKE_CURRENT_LIST_DIR}/CatchShardTestsImpl.cmake")
+  set(shard_impl_script_file "${_CATCH_DISCOVER_SHARD_TESTS_IMPL_SCRIPT}")
 
   add_custom_command(
     TARGET ${TARGET} POST_BUILD
@@ -64,3 +64,11 @@ function(catch_add_sharded_tests TARGET)
 
 
 endfunction()
+
+
+###############################################################################
+
+set(_CATCH_DISCOVER_SHARD_TESTS_IMPL_SCRIPT
+    ${CMAKE_CURRENT_LIST_DIR}/CatchShardTestsImpl.cmake
+  CACHE INTERNAL "Catch2 full path to CatchShardTestsImpl.cmake helper file"
+)