summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorZsolt Parragi <zsolt.parragi@cancellar.hu>2016-10-25 16:23:22 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-28 15:18:03 (GMT)
commit1e4bb358946a100ea04bbc97f8195b90b44a5e9c (patch)
treeec0cebb25ef0f6fcc0d68ab8548e0d2a1f004ab3 /Source/cmLocalVisualStudio7Generator.cxx
parentee0f2d23fcf3cd7a67ad8d7bd132a475ed78405f (diff)
downloadCMake-1e4bb358946a100ea04bbc97f8195b90b44a5e9c.zip
CMake-1e4bb358946a100ea04bbc97f8195b90b44a5e9c.tar.gz
CMake-1e4bb358946a100ea04bbc97f8195b90b44a5e9c.tar.bz2
Add generator expression support to per-source COMPILE_FLAGS
This allows users to specify different genex-based compile flags for each file in a target, e.g. compiling just a single file with `Od/Ox` in release builds on Visual Studio.
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 7c32e6c..49b057b 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1464,7 +1464,9 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo(
needfc = true;
}
if (const char* cflags = sf.GetProperty("COMPILE_FLAGS")) {
- fc.CompileFlags = cflags;
+ cmGeneratorExpression ge;
+ CM_AUTO_PTR<cmCompiledGeneratorExpression> cge = ge.Parse(cflags);
+ fc.CompileFlags = cge->Evaluate(lg, *i);
needfc = true;
}
if (lg->FortranProject) {