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" +)