diff options
author | Brad King <brad.king@kitware.com> | 2018-10-29 15:15:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-10-29 15:37:32 (GMT) |
commit | 50572d638b3903f2c2af636dcfe9d3765fd87a7c (patch) | |
tree | c49c51130aae4e2a207995783bea9106c7fd2a44 /Tests/RunCMake/ScriptMode | |
parent | e4a0d8f39987a4574336892106b39781fd2d4e50 (diff) | |
download | CMake-50572d638b3903f2c2af636dcfe9d3765fd87a7c.zip CMake-50572d638b3903f2c2af636dcfe9d3765fd87a7c.tar.gz CMake-50572d638b3903f2c2af636dcfe9d3765fd87a7c.tar.bz2 |
set_directory_properties: Restore in script mode
Since commit v3.10.0-rc1~391^2~3 (Add directory property 'LABELS' and
CMAKE_DIRECTORY_LABELS variable, 2017-06-23) this command was
accidentally not allowed in script mode. It was dropped because
`ctest -S` mode needs to start with CMake's normal script mode and
then replace the `set_directory_properties` implementation. Restore
the normal `set_directory_properties` in script mode and then add
special logic to replace it in ctest. Also add a test case.
Fixes: #18523
Diffstat (limited to 'Tests/RunCMake/ScriptMode')
-rw-r--r-- | Tests/RunCMake/ScriptMode/RunCMakeTest.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/ScriptMode/set_directory_properties.cmake | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Tests/RunCMake/ScriptMode/RunCMakeTest.cmake b/Tests/RunCMake/ScriptMode/RunCMakeTest.cmake new file mode 100644 index 0000000..4c44ffb --- /dev/null +++ b/Tests/RunCMake/ScriptMode/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake_command(set_directory_properties ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/set_directory_properties.cmake) diff --git a/Tests/RunCMake/ScriptMode/set_directory_properties.cmake b/Tests/RunCMake/ScriptMode/set_directory_properties.cmake new file mode 100644 index 0000000..bf79317 --- /dev/null +++ b/Tests/RunCMake/ScriptMode/set_directory_properties.cmake @@ -0,0 +1 @@ +set_directory_properties(PROPERTIES SOME_PROPERTY FALSE) |