diff options
author | Craig Scott <craig.scott@crascit.com> | 2020-10-23 10:35:51 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-10-23 10:36:03 (GMT) |
commit | 5d20e6d8036a158df8b512682d394492ab7161b9 (patch) | |
tree | 9ae6c8380b697bba13fa7178e73efdd634075fc5 /Tests | |
parent | 6d306a42da59e1277942078a5df7863c489e9600 (diff) | |
parent | 25742c589c80724b1d03357e0c911c443ab991f4 (diff) | |
download | CMake-5d20e6d8036a158df8b512682d394492ab7161b9.zip CMake-5d20e6d8036a158df8b512682d394492ab7161b9.tar.gz CMake-5d20e6d8036a158df8b512682d394492ab7161b9.tar.bz2 |
Merge topic 'cmake-presets-source-dir-name'
25742c589c CMakePresets.json: Add ${sourceDirName} macro
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !5386
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") |