|
|
@@ -53,10 +53,6 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
|
|
|
} else {
|
|
|
const char* cmakeGeneratorName =
|
|
|
this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR");
|
|
|
- const char* cmakeProjectName =
|
|
|
- (this->Values[ctb_PROJECT_NAME] && *this->Values[ctb_PROJECT_NAME])
|
|
|
- ? this->Values[ctb_PROJECT_NAME]
|
|
|
- : this->Makefile->GetDefinition("CTEST_PROJECT_NAME");
|
|
|
|
|
|
// Build configuration is determined by: CONFIGURATION argument,
|
|
|
// or CTEST_BUILD_CONFIGURATION script variable, or
|
|
|
@@ -81,8 +77,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
|
|
|
? this->Values[ctb_TARGET]
|
|
|
: this->Makefile->GetDefinition("CTEST_BUILD_TARGET");
|
|
|
|
|
|
- if (cmakeGeneratorName && *cmakeGeneratorName && cmakeProjectName &&
|
|
|
- *cmakeProjectName) {
|
|
|
+ if (cmakeGeneratorName && *cmakeGeneratorName) {
|
|
|
if (!cmakeBuildConfiguration) {
|
|
|
cmakeBuildConfiguration = "Release";
|
|
|
}
|
|
|
@@ -132,14 +127,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
|
|
|
/* clang-format off */
|
|
|
ostr << "has no project to build. If this is a "
|
|
|
"\"built with CMake\" project, verify that CTEST_CMAKE_GENERATOR "
|
|
|
- "and CTEST_PROJECT_NAME are set."
|
|
|
- "\n"
|
|
|
- "CTEST_PROJECT_NAME is usually set in CTestConfig.cmake. Verify "
|
|
|
- "that CTestConfig.cmake exists, or CTEST_PROJECT_NAME "
|
|
|
- "is set in the script, or PROJECT_NAME is passed as an argument "
|
|
|
- "to ctest_build."
|
|
|
- "\n"
|
|
|
- "Alternatively, set CTEST_BUILD_COMMAND to build the project "
|
|
|
+ "is set. Otherwise, set CTEST_BUILD_COMMAND to build the project "
|
|
|
"with a custom command line.";
|
|
|
/* clang-format on */
|
|
|
this->SetError(ostr.str());
|