summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestHandler.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-29 15:15:10 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-29 15:37:32 (GMT)
commit50572d638b3903f2c2af636dcfe9d3765fd87a7c (patch)
treec49c51130aae4e2a207995783bea9106c7fd2a44 /Source/CTest/cmCTestTestHandler.cxx
parente4a0d8f39987a4574336892106b39781fd2d4e50 (diff)
downloadCMake-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 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index c7ed927..d24410d 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1662,6 +1662,7 @@ void cmCTestTestHandler::GetListOfTests()
cm.GetState()->AddBuiltinCommand("set_tests_properties", newCom4);
// Add handler for SET_DIRECTORY_PROPERTIES
+ cm.GetState()->RemoveBuiltinCommand("set_directory_properties");
cmCTestSetDirectoryPropertiesCommand* newCom5 =
new cmCTestSetDirectoryPropertiesCommand;
newCom5->TestHandler = this;