diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index ed3afc5c5..4ed2f433b 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -25,7 +25,9 @@ function(run_cmake test) unset(expect_std${o}) endif() endforeach() - set(RunCMake_TEST_SOURCE_DIR "${top_src}") + if (NOT RunCMake_TEST_SOURCE_DIR) + set(RunCMake_TEST_SOURCE_DIR "${top_src}") + endif() if(NOT RunCMake_TEST_BINARY_DIR) set(RunCMake_TEST_BINARY_DIR "${top_bin}/${test}-build") endif() @@ -36,6 +38,9 @@ function(run_cmake test) if(NOT DEFINED RunCMake_TEST_OPTIONS) set(RunCMake_TEST_OPTIONS "") endif() + if (NOT RunCMake_TEST_FILE) + set(RunCMake_TEST_FILE "${test}") + endif() if(APPLE) list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0025=NEW) endif() @@ -52,7 +57,7 @@ function(run_cmake test) COMMAND ${CMAKE_COMMAND} "${RunCMake_TEST_SOURCE_DIR}" -G "${RunCMake_GENERATOR}" -T "${RunCMake_GENERATOR_TOOLSET}" - -DRunCMake_TEST=${test} + -DRunCMake_TEST=${RunCMake_TEST_FILE} --no-warn-unused-cli ${RunCMake_TEST_OPTIONS} WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}" diff --git a/Tests/RunCMake/set/PARENT_SCOPE-result.txt b/Tests/RunCMake/set/ParentScope-result.txt similarity index 100% rename from Tests/RunCMake/set/PARENT_SCOPE-result.txt rename to Tests/RunCMake/set/ParentScope-result.txt diff --git a/Tests/RunCMake/set/PARENT_SCOPE.cmake b/Tests/RunCMake/set/ParentScope.cmake similarity index 100% rename from Tests/RunCMake/set/PARENT_SCOPE.cmake rename to Tests/RunCMake/set/ParentScope.cmake diff --git a/Tests/RunCMake/set/RunCMakeTest.cmake b/Tests/RunCMake/set/RunCMakeTest.cmake index 5d036e3b8..1b51ea27c 100644 --- a/Tests/RunCMake/set/RunCMakeTest.cmake +++ b/Tests/RunCMake/set/RunCMakeTest.cmake @@ -1,3 +1,3 @@ include(RunCMake) -run_cmake(PARENT_SCOPE) +run_cmake(ParentScope)