diff options
author | Brad King <brad.king@kitware.com> | 2006-02-20 19:21:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-02-20 19:21:10 (GMT) |
commit | 7bdec941542ab7cf93a7d6417ff2e5528d6b1b87 (patch) | |
tree | 3d7314a6065e9e88ded890aaa28afd74f9d86021 /Source/cmLocalVisualStudio7Generator.cxx | |
parent | 39e636a4a40de5dd57ea083c65f41fb38755a015 (diff) | |
download | CMake-7bdec941542ab7cf93a7d6417ff2e5528d6b1b87.zip CMake-7bdec941542ab7cf93a7d6417ff2e5528d6b1b87.tar.gz CMake-7bdec941542ab7cf93a7d6417ff2e5528d6b1b87.tar.bz2 |
BUG: Add target-level COMPILE_FLAGS to the target not the individual source files. This simplifies the generated files and puts flags in a more logical order (VS6 works, VS7 needs more translation to work).
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index aabe886..c668ad6 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -520,6 +520,13 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, programDatabase += "\""; } + // Add the target-specific flags. + if(const char* targetFlags = target.GetProperty("COMPILE_FLAGS")) + { + flags += " "; + flags += targetFlags; + } + // The intermediate directory name consists of a directory for the // target and a subdirectory for the configuration name. std::string intermediateDir = this->GetTargetDirectory(target); @@ -1084,12 +1091,7 @@ void cmLocalVisualStudio7Generator::WriteGroup(const cmSourceGroup *sg, cmTarget std::string compileFlags; std::string additionalDeps; - // Check for extra compiler flags. - if(target.GetProperty("COMPILE_FLAGS")) - { - compileFlags += " "; - compileFlags += target.GetProperty("COMPILE_FLAGS"); - } + // Add per-source flags. const char* cflags = (*sf)->GetProperty("COMPILE_FLAGS"); if(cflags) { |