diff options
author | Brad King <brad.king@kitware.com> | 2017-10-02 12:25:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-10-03 12:03:33 (GMT) |
commit | 303cd7037a5de2b26373ed4184fd36e68e0f01da (patch) | |
tree | 49398fbc6dd15245f8f922cdb6ff58b8c16efd5d /Source | |
parent | db730f3e5092bbfcd1cee8c0cdf5150c88fb65b3 (diff) | |
download | CMake-303cd7037a5de2b26373ed4184fd36e68e0f01da.zip CMake-303cd7037a5de2b26373ed4184fd36e68e0f01da.tar.gz CMake-303cd7037a5de2b26373ed4184fd36e68e0f01da.tar.bz2 |
VS,Xcode: Fix TARGET_PROPERTY genex in source COMPILE_FLAGS property
This already worked in other generators. Also add a test case.
Fixes: #17314
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 3 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 304a188..c79ee47 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -668,7 +668,8 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile( std::string configName = "NO-PER-CONFIG-SUPPORT-IN-XCODE"; std::unique_ptr<cmCompiledGeneratorExpression> compiledExpr = ge.Parse(cflags); - const char* processed = compiledExpr->Evaluate(lg, configName); + const char* processed = + compiledExpr->Evaluate(lg, configName, false, gtgt); if (compiledExpr->GetHadContextSensitiveCondition()) { std::ostringstream e; /* clang-format off */ diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 8027191..d8030b7 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1454,7 +1454,7 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo( if (const char* cflags = sf.GetProperty("COMPILE_FLAGS")) { cmGeneratorExpression ge; std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(cflags); - fc.CompileFlags = cge->Evaluate(lg, *i); + fc.CompileFlags = cge->Evaluate(lg, *i, false, gt); needfc = true; } if (lg->FortranProject) { diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 6535008..eb5a3e4 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2125,8 +2125,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( if (configDependentFlags) { cmGeneratorExpression ge; std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(flags); - std::string evaluatedFlags = - cge->Evaluate(this->LocalGenerator, *config); + std::string evaluatedFlags = cge->Evaluate( + this->LocalGenerator, *config, false, this->GeneratorTarget); clOptions.Parse(evaluatedFlags.c_str()); } else { clOptions.Parse(flags.c_str()); |