cmGeneratorTarget::GetProperty: return cmProp

This commit is contained in:
Vitaly Stakhovsky
2020-04-29 11:00:00 -04:00
parent d63c442a6b
commit 36aba01223
32 changed files with 644 additions and 649 deletions

View File

@@ -244,9 +244,9 @@ void cmGlobalVisualStudio8Generator::WriteProjectConfigurations(
std::vector<std::string> mapConfig;
const char* dstConfig = i.c_str();
if (target.GetProperty("EXTERNAL_MSPROJECT")) {
if (const char* m = target.GetProperty("MAP_IMPORTED_CONFIG_" +
cmSystemTools::UpperCase(i))) {
cmExpandList(m, mapConfig);
if (cmProp m = target.GetProperty("MAP_IMPORTED_CONFIG_" +
cmSystemTools::UpperCase(i))) {
cmExpandList(*m, mapConfig);
if (!mapConfig.empty()) {
dstConfig = mapConfig[0].c_str();
}
@@ -286,15 +286,15 @@ bool cmGlobalVisualStudio8Generator::NeedsDeploy(
return false;
}
if (const char* prop = target.GetProperty("VS_SOLUTION_DEPLOY")) {
if (cmProp prop = target.GetProperty("VS_SOLUTION_DEPLOY")) {
// If set, it dictates behavior
return cmIsOn(
cmGeneratorExpression::Evaluate(prop, target.LocalGenerator, config));
cmGeneratorExpression::Evaluate(*prop, target.LocalGenerator, config));
}
// To be deprecated, disable deployment even if target supports it.
if (const char* prop = target.GetProperty("VS_NO_SOLUTION_DEPLOY")) {
if (cmIsOn(cmGeneratorExpression::Evaluate(prop, target.LocalGenerator,
if (cmProp prop = target.GetProperty("VS_NO_SOLUTION_DEPLOY")) {
if (cmIsOn(cmGeneratorExpression::Evaluate(*prop, target.LocalGenerator,
config))) {
// If true, always disable deployment
return false;