diff options
author | Brad King <brad.king@kitware.com> | 2006-02-20 17:48:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-02-20 17:48:56 (GMT) |
commit | e20c0071816156658f10a2ccd7038fb334179169 (patch) | |
tree | 892606812d6c691481adffbc968c96d871d8078c /Source | |
parent | 3fa4a95f563feee42a2ffdfae5a972ddd864066e (diff) | |
download | CMake-e20c0071816156658f10a2ccd7038fb334179169.zip CMake-e20c0071816156658f10a2ccd7038fb334179169.tar.gz CMake-e20c0071816156658f10a2ccd7038fb334179169.tar.bz2 |
ENH: Order compilation flags from most general to most specific: language, then target, then source.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index ad9c72c..ffda9f2 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -321,8 +321,17 @@ cmMakefileTargetGenerator relativeObj = cmSystemTools::ConvertToOutputPath(relativeObj.c_str()); } // Write the build rule. + // Build the set of compiler flags. std::string flags; + + // Add language-specific flags. + std::string langFlags = "$("; + langFlags += lang; + langFlags += "_FLAGS)"; + this->LocalGenerator->AppendFlags(flags, langFlags.c_str()); + + // Add target-specific flags. if(this->Target->GetProperty("COMPILE_FLAGS")) { this->LocalGenerator->AppendFlags(flags, this->Target->GetProperty("COMPILE_FLAGS")); @@ -339,12 +348,6 @@ cmMakefileTargetGenerator << "\n"; } - // Add language-specific flags. - std::string langFlags = "$("; - langFlags += lang; - langFlags += "_FLAGS)"; - this->LocalGenerator->AppendFlags(flags, langFlags.c_str()); - // Get the output paths for source and object files. std::string sourceFile = source.GetFullPath(); if(this->LocalGenerator->m_UseRelativePaths) |