diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-03-06 20:14:23 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-03-06 20:14:23 (GMT) |
commit | 3f532f54897d300e17d35630d3d6ba15a719bd27 (patch) | |
tree | 56b3bf4cc8a4b505a2a5c2460574d5d458962ef6 /Source | |
parent | 36080b04bbf07fdecdfaf516949f722a65aa9361 (diff) | |
download | CMake-3f532f54897d300e17d35630d3d6ba15a719bd27.zip CMake-3f532f54897d300e17d35630d3d6ba15a719bd27.tar.gz CMake-3f532f54897d300e17d35630d3d6ba15a719bd27.tar.bz2 |
ENH: add support for language flags at rule expansion time
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmLocalGenerator.h | 1 | ||||
-rw-r--r-- | Source/cmMakefileLibraryTargetGenerator.cxx | 6 |
3 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 032e57d..107404c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -604,6 +604,10 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable, return targetQuoted; } } + if(variable == "LANGUAGE_COMPILE_FLAGS") + { + return replaceValues.LanguageCompileFlags; + } if(variable == "TARGET") { return replaceValues.Target; diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index d28917a..0323913 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -196,6 +196,7 @@ public: const char* TargetSOName; const char* TargetInstallNameDir; const char* LinkFlags; + const char* LanguageCompileFlags; }; protected: diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index a5b6154..ade1696 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -431,7 +431,11 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules vars.TargetInstallNameDir = install_name_dir.c_str(); } } - + std::string langFlags; + this->LocalGenerator + ->AddLanguageFlags(langFlags, linkLanguage, + this->LocalGenerator->m_ConfigurationName.c_str()); + vars.LanguageCompileFlags = langFlags.c_str(); // Expand placeholders in the commands. this->LocalGenerator->m_TargetImplib = targetOutPathImport; for(std::vector<std::string>::iterator i = commands.begin(); |