diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2009-11-03 21:46:30 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2009-11-03 21:46:30 (GMT) |
commit | 85912a37772b9ceea1ef3b22b0ed9d1c94e9f5b4 (patch) | |
tree | dc05636eedbbd3a782c5d06e0c5c81b6c7f07b54 /Source/CTest/cmCTestBuildCommand.cxx | |
parent | b9e88cd4c8ed6f0e4e0fd05f1e01694cba906b6c (diff) | |
download | CMake-85912a37772b9ceea1ef3b22b0ed9d1c94e9f5b4.zip CMake-85912a37772b9ceea1ef3b22b0ed9d1c94e9f5b4.tar.gz CMake-85912a37772b9ceea1ef3b22b0ed9d1c94e9f5b4.tar.bz2 |
Added TARGET, CONFIGURATION, PROJECT_NAME, and FLAGS arguments to ctest_build command
Diffstat (limited to 'Source/CTest/cmCTestBuildCommand.cxx')
-rw-r--r-- | Source/CTest/cmCTestBuildCommand.cxx | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx index 3fe1c00..af21e0d 100644 --- a/Source/CTest/cmCTestBuildCommand.cxx +++ b/Source/CTest/cmCTestBuildCommand.cxx @@ -23,7 +23,11 @@ cmCTestBuildCommand::cmCTestBuildCommand() { this->GlobalGenerator = 0; this->Arguments[ctb_NUMBER_ERRORS] = "NUMBER_ERRORS"; - this->Arguments[ctb_NUMBER_WARNINGS] = "NUMBER_WARNINGS"; + this->Arguments[ctb_NUMBER_WARNINGS] = "NUMBER_WARNINGS"; + this->Arguments[ctb_TARGET] = "TARGET"; + this->Arguments[ctb_CONFIGURATION] = "CONFIGURATION"; + this->Arguments[ctb_FLAGS] = "FLAGS"; + this->Arguments[ctb_PROJECT_NAME] = "PROJECT_NAME"; this->Arguments[ctb_LAST] = 0; this->Last = ctb_LAST; } @@ -60,13 +64,22 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler() const char* cmakeGeneratorName = this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR"); const char* cmakeProjectName - = this->Makefile->GetDefinition("CTEST_PROJECT_NAME"); + = (this->Values[ctb_PROJECT_NAME] && *this->Values[ctb_PROJECT_NAME]) + ? this->Values[ctb_PROJECT_NAME] + : this->Makefile->GetDefinition("CTEST_PROJECT_NAME"); const char* cmakeBuildConfiguration - = this->Makefile->GetDefinition("CTEST_BUILD_CONFIGURATION"); + = (this->Values[ctb_CONFIGURATION] && *this->Values[ctb_CONFIGURATION]) + ? this->Values[ctb_CONFIGURATION] + : this->Makefile->GetDefinition("CTEST_BUILD_CONFIGURATION"); const char* cmakeBuildAdditionalFlags - = this->Makefile->GetDefinition("CTEST_BUILD_FLAGS"); + = (this->Values[ctb_FLAGS] && *this->Values[ctb_FLAGS]) + ? this->Values[ctb_FLAGS] + : this->Makefile->GetDefinition("CTEST_BUILD_FLAGS"); const char* cmakeBuildTarget - = this->Makefile->GetDefinition("CTEST_BUILD_TARGET"); + = (this->Values[ctb_TARGET] && *this->Values[ctb_TARGET]) + ? this->Values[ctb_TARGET] + : this->Makefile->GetDefinition("CTEST_BUILD_TARGET"); + if ( cmakeGeneratorName && *cmakeGeneratorName && cmakeProjectName && *cmakeProjectName ) { |