diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-07-07 14:53:55 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-07-07 16:21:58 (GMT) |
commit | c57695a2f4ad325346e33eee655b75c1716cf957 (patch) | |
tree | 2042da6587a8bc5c9f3132b0fad32927597fa528 /Tests/RunCMake/CTestResourceAllocation/test.cmake.in | |
parent | dab33d1e3339c0f06437692db0c3e1db49765ba2 (diff) | |
download | CMake-c57695a2f4ad325346e33eee655b75c1716cf957.zip CMake-c57695a2f4ad325346e33eee655b75c1716cf957.tar.gz CMake-c57695a2f4ad325346e33eee655b75c1716cf957.tar.bz2 |
Help: Clarify search order for resource spec file
Clarify the order in which --resource-spec-file, RESOURCE_SPEC_FILE,
and CTEST_RESOURCE_SPEC_FILE are searched, and add tests to
enforce this.
Fixes: #20914
Diffstat (limited to 'Tests/RunCMake/CTestResourceAllocation/test.cmake.in')
-rw-r--r-- | Tests/RunCMake/CTestResourceAllocation/test.cmake.in | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Tests/RunCMake/CTestResourceAllocation/test.cmake.in b/Tests/RunCMake/CTestResourceAllocation/test.cmake.in index 54eb4e9..9ad9ac8 100644 --- a/Tests/RunCMake/CTestResourceAllocation/test.cmake.in +++ b/Tests/RunCMake/CTestResourceAllocation/test.cmake.in @@ -12,10 +12,15 @@ set(config_options "-DCTEST_RESOURCE_ALLOC_ENABLED=${CTEST_RESOURCE_ALLOC_ENABLED};-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}" ) -if(CTEST_RESOURCE_SPEC_SOURCE STREQUAL "ARG") +if(CTEST_RESOURCE_SPEC_SOURCE STREQUAL "CMDLINE") + list(APPEND config_options "-DCTEST_RESOURCE_SPEC_FILE=@RunCMake_SOURCE_DIR@/noexist.json") +elseif(CTEST_RESOURCE_SPEC_SOURCE STREQUAL "ARG") set(resspec RESOURCE_SPEC_FILE "@RunCMake_SOURCE_DIR@/resspec.json") + set(CTEST_RESOURCE_SPEC_FILE "@RunCMake_SOURCE_DIR@/noexist.json") + list(APPEND config_options "-DCTEST_RESOURCE_SPEC_FILE=@RunCMake_SOURCE_DIR@/noexist.json") elseif(CTEST_RESOURCE_SPEC_SOURCE STREQUAL "VARIABLE") set(CTEST_RESOURCE_SPEC_FILE "@RunCMake_SOURCE_DIR@/resspec.json") + list(APPEND config_options "-DCTEST_RESOURCE_SPEC_FILE=@RunCMake_SOURCE_DIR@/noexist.json") elseif(CTEST_RESOURCE_SPEC_SOURCE STREQUAL "CACHE") list(APPEND config_options "-DCTEST_RESOURCE_SPEC_FILE=@RunCMake_SOURCE_DIR@/resspec.json") endif() |