diff options
author | Regina Pfeifer <regina@mailbox.org> | 2018-11-20 12:50:19 (GMT) |
---|---|---|
committer | Regina Pfeifer <regina@mailbox.org> | 2018-11-20 20:23:59 (GMT) |
commit | 3125c47d27d4d57cb31e10c4bd658fc1e352299d (patch) | |
tree | 420977254a737332c5edc9126f43dda8c7fc7582 /Source/CTest | |
parent | 36bbd07a765820ddbcaef3db4e2a78d95910f5e1 (diff) | |
download | CMake-3125c47d27d4d57cb31e10c4bd658fc1e352299d.zip CMake-3125c47d27d4d57cb31e10c4bd658fc1e352299d.tar.gz CMake-3125c47d27d4d57cb31e10c4bd658fc1e352299d.tar.bz2 |
ctest_build: Do not require unnecessary [CTEST_]PROJECT_NAME value
Since commit v3.0.0-rc1~260^2~32 (ctest_build: Use "cmake --build"
to launch the native build tool, 2013-11-14) we no longer need to
use the project name in `ctest_build()`.
Fixes: #18612
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestBuildCommand.cxx | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx index ce27da1..65b4976 100644 --- a/Source/CTest/cmCTestBuildCommand.cxx +++ b/Source/CTest/cmCTestBuildCommand.cxx @@ -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()); |