summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-04-29 15:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-04-29 14:59:39 (GMT)
commit36aba01223cfb28ee574386cd91dbfccc4dc9359 (patch)
tree7acf2fc54b9ddf7a5372cb088eb80cde6764408d /Source/cmGlobalGenerator.cxx
parentd63c442a6bcec287afb32a88c80b68cb141f49f4 (diff)
downloadCMake-36aba01223cfb28ee574386cd91dbfccc4dc9359.zip
CMake-36aba01223cfb28ee574386cd91dbfccc4dc9359.tar.gz
CMake-36aba01223cfb28ee574386cd91dbfccc4dc9359.tar.bz2
cmGeneratorTarget::GetProperty: return cmProp
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx24
1 files changed, 16 insertions, 8 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index a6ca75f..2664fb0 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -303,10 +303,14 @@ bool cmGlobalGenerator::CheckTargetsForMissingSources() const
for (const auto& target : localGen->GetGeneratorTargets()) {
if (target->GetType() == cmStateEnums::TargetType::GLOBAL_TARGET ||
target->GetType() == cmStateEnums::TargetType::INTERFACE_LIBRARY ||
- target->GetType() == cmStateEnums::TargetType::UTILITY ||
- cmIsOn(target->GetProperty("ghs_integrity_app"))) {
+ target->GetType() == cmStateEnums::TargetType::UTILITY) {
continue;
}
+ if (cmProp p = target->GetProperty("ghs_integrity_app")) {
+ if (cmIsOn(*p)) {
+ continue;
+ }
+ }
std::vector<std::string> configs;
target->Makefile->GetConfigurations(configs);
@@ -371,10 +375,14 @@ bool cmGlobalGenerator::CheckTargetsForPchCompilePdb() const
for (const auto& target : generator->GetGeneratorTargets()) {
if (target->GetType() == cmStateEnums::TargetType::GLOBAL_TARGET ||
target->GetType() == cmStateEnums::TargetType::INTERFACE_LIBRARY ||
- target->GetType() == cmStateEnums::TargetType::UTILITY ||
- cmIsOn(target->GetProperty("ghs_integrity_app"))) {
+ target->GetType() == cmStateEnums::TargetType::UTILITY) {
continue;
}
+ if (cmProp p = target->GetProperty("ghs_integrity_app")) {
+ if (cmIsOn(*p)) {
+ continue;
+ }
+ }
const std::string reuseFrom =
target->GetSafeProperty("PRECOMPILE_HEADERS_REUSE_FROM");
@@ -2160,8 +2168,8 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
return true;
}
- if (const char* exclude = target->GetProperty("EXCLUDE_FROM_ALL")) {
- return cmIsOn(exclude);
+ if (cmProp exclude = target->GetProperty("EXCLUDE_FROM_ALL")) {
+ return cmIsOn(*exclude);
}
// This target is included in its directory. Check whether the
// directory is excluded.
@@ -3040,7 +3048,7 @@ void cmGlobalGenerator::WriteSummary(cmGeneratorTarget* target)
#ifndef CMAKE_BOOTSTRAP
// Check whether labels are enabled for this target.
- const char* targetLabels = target->GetProperty("LABELS");
+ cmProp targetLabels = target->GetProperty("LABELS");
cmProp directoryLabels =
target->Target->GetMakefile()->GetProperty("LABELS");
const char* cmakeDirectoryLabels =
@@ -3060,7 +3068,7 @@ void cmGlobalGenerator::WriteSummary(cmGeneratorTarget* target)
// List the target-wide labels. All sources in the target get
// these labels.
if (targetLabels) {
- cmExpandList(targetLabels, labels);
+ cmExpandList(*targetLabels, labels);
if (!labels.empty()) {
fout << "# Target labels\n";
for (std::string const& l : labels) {