From 810c47f56e0bde46c163943609f7e0464e6287fd Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 4 Sep 2008 11:31:10 -0400 Subject: [PATCH] BUG: Make CTest honor user-specified config When the -C or --build-config option is used to specify the configuration to be tested by CTest, do not override it with the configuration in which CTest is built. --- Source/CTest/cmCTestBuildAndTestHandler.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index ccd4ec1a3..cb713a610 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -79,7 +79,10 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring, config = this->CTest->GetConfigType().c_str(); } #ifdef CMAKE_INTDIR - config = CMAKE_INTDIR; + if(!config) + { + config = CMAKE_INTDIR; + } #endif if ( config ) @@ -259,7 +262,10 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) config = this->CTest->GetConfigType().c_str(); } #ifdef CMAKE_INTDIR - config = CMAKE_INTDIR; + if(!config) + { + config = CMAKE_INTDIR; + } #endif if(!config) {