diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-16 19:31:01 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-22 15:09:28 (GMT) |
commit | 25742c589c80724b1d03357e0c911c443ab991f4 (patch) | |
tree | 7412e73ffa82a88e7beb9cc01fe7a638a5363444 /Tests | |
parent | 609122007dc074739b394d2f70f674bbccca6073 (diff) | |
download | CMake-25742c589c80724b1d03357e0c911c443ab991f4.zip CMake-25742c589c80724b1d03357e0c911c443ab991f4.tar.gz CMake-25742c589c80724b1d03357e0c911c443ab991f4.tar.bz2 |
CMakePresets.json: Add ${sourceDirName} macro
Fixes: #21312
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CMakePresets/CMakePresets.json.in | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMakePresets/Good-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMakePresets/Good.cmake | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakePresets/CMakePresets.json.in b/Tests/RunCMake/CMakePresets/CMakePresets.json.in index ea7df45..3ad667c 100644 --- a/Tests/RunCMake/CMakePresets/CMakePresets.json.in +++ b/Tests/RunCMake/CMakePresets/CMakePresets.json.in @@ -72,6 +72,7 @@ "TEST_DOLLAR": { "value": "${dollar}" }, + "TEST_SOURCE_DIR_NAME": "${sourceDirName}", "TEST_ENV_REF": "$env{TEST_ENV_REF}", "TEST_ENV": "$env{TEST_ENV}", "TEST_D_ENV_REF": "$env{TEST_D_ENV_REF}", diff --git a/Tests/RunCMake/CMakePresets/Good-stdout.txt b/Tests/RunCMake/CMakePresets/Good-stdout.txt index 7adf1ca..75003c7 100644 --- a/Tests/RunCMake/CMakePresets/Good-stdout.txt +++ b/Tests/RunCMake/CMakePresets/Good-stdout.txt @@ -26,6 +26,7 @@ Preset CMake variables: TEST_PRESET_NAME:STRING="xGoodx" TEST_SOURCE_DIR:PATH="[^ ]*/Tests/RunCMake/CMakePresets/Good" + TEST_SOURCE_DIR_NAME="Good" TEST_SOURCE_LIST:FILEPATH="[^ ]*/Tests/RunCMake/CMakePresets/Good/CMakeLists\.txt" TEST_SOURCE_PARENT_DIR:PATH="[^ diff --git a/Tests/RunCMake/CMakePresets/Good.cmake b/Tests/RunCMake/CMakePresets/Good.cmake index 55b85da..73a618d 100644 --- a/Tests/RunCMake/CMakePresets/Good.cmake +++ b/Tests/RunCMake/CMakePresets/Good.cmake @@ -17,6 +17,7 @@ test_variable(TEST_UNTYPED_BOOL_FALSE "UNINITIALIZED" "FALSE") test_variable(TEST_PRESET_NAME "STRING" "xGoodx") test_variable(TEST_GENERATOR "UNINITIALIZED" "x${CMAKE_GENERATOR}x") test_variable(TEST_DOLLAR "UNINITIALIZED" "$") +test_variable(TEST_SOURCE_DIR_NAME "UNINITIALIZED" "Good") test_variable(TEST_ENV_REF "UNINITIALIZED" "Environment variable") test_variable(TEST_ENV "UNINITIALIZED" "Environment variable") test_variable(TEST_D_ENV_REF "UNINITIALIZED" "xEnvironment variablex") |