diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-07-27 23:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-07-28 12:31:31 (GMT) |
commit | f37c14e93036fe01fca3539f539ff8821494e9d1 (patch) | |
tree | fc08ddab0c3e9b47f00cff9a287cc89a2afa13ca /Source/CTest | |
parent | 261a2585d9df7113a5ba7c9beacb641754444523 (diff) | |
download | CMake-f37c14e93036fe01fca3539f539ff8821494e9d1.zip CMake-f37c14e93036fe01fca3539f539ff8821494e9d1.tar.gz CMake-f37c14e93036fe01fca3539f539ff8821494e9d1.tar.bz2 |
Source: use cmNonempty()
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestBuildCommand.cxx | 4 | ||||
-rw-r--r-- | Source/CTest/cmCTestConfigureCommand.cxx | 6 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestCommand.cxx | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx index f33bdc4..8aab167 100644 --- a/Source/CTest/cmCTestBuildCommand.cxx +++ b/Source/CTest/cmCTestBuildCommand.cxx @@ -56,7 +56,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler() this->Makefile->GetDefinition("CTEST_BUILD_CONFIGURATION"); const char* cmakeBuildConfiguration = !this->Configuration.empty() ? this->Configuration.c_str() - : ((ctestBuildConfiguration && *ctestBuildConfiguration) + : (cmNonempty(ctestBuildConfiguration) ? ctestBuildConfiguration : this->CTest->GetConfigType().c_str()); @@ -67,7 +67,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler() ? this->Target.c_str() : this->Makefile->GetDefinition("CTEST_BUILD_TARGET"); - if (cmakeGeneratorName && *cmakeGeneratorName) { + if (cmNonempty(cmakeGeneratorName)) { if (!cmakeBuildConfiguration) { cmakeBuildConfiguration = "Release"; } diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx index 8716b31..ac57130 100644 --- a/Source/CTest/cmCTestConfigureCommand.cxx +++ b/Source/CTest/cmCTestConfigureCommand.cxx @@ -48,7 +48,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler() } else { const char* cmakeGeneratorName = this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR"); - if (cmakeGeneratorName && *cmakeGeneratorName) { + if (cmNonempty(cmakeGeneratorName)) { const std::string& source_dir = this->CTest->GetCTestConfiguration("SourceDirectory"); if (source_dir.empty()) { @@ -108,7 +108,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler() const char* cmakeGeneratorPlatform = this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR_PLATFORM"); - if (cmakeGeneratorPlatform && *cmakeGeneratorPlatform) { + if (cmNonempty(cmakeGeneratorPlatform)) { cmakeConfigureCommand += " \"-A"; cmakeConfigureCommand += cmakeGeneratorPlatform; cmakeConfigureCommand += "\""; @@ -116,7 +116,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler() const char* cmakeGeneratorToolset = this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR_TOOLSET"); - if (cmakeGeneratorToolset && *cmakeGeneratorToolset) { + if (cmNonempty(cmakeGeneratorToolset)) { cmakeConfigureCommand += " \"-T"; cmakeConfigureCommand += cmakeGeneratorToolset; cmakeConfigureCommand += "\""; diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx index 07ea912..cbc3c0c 100644 --- a/Source/CTest/cmCTestTestCommand.cxx +++ b/Source/CTest/cmCTestTestCommand.cxx @@ -117,13 +117,13 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler() unsigned long testLoad; const char* ctestTestLoad = this->Makefile->GetDefinition("CTEST_TEST_LOAD"); if (!this->TestLoad.empty()) { - if (!cmStrToULong(this->TestLoad.c_str(), &testLoad)) { + if (!cmStrToULong(this->TestLoad, &testLoad)) { testLoad = 0; cmCTestLog(this->CTest, WARNING, "Invalid value for 'TEST_LOAD' : " << this->TestLoad << std::endl); } - } else if (ctestTestLoad && *ctestTestLoad) { + } else if (cmNonempty(ctestTestLoad)) { if (!cmStrToULong(ctestTestLoad, &testLoad)) { testLoad = 0; cmCTestLog(this->CTest, WARNING, |