diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2007-12-13 20:54:29 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2007-12-13 20:54:29 (GMT) |
commit | fd33bf93a5e9d86ee249cc3fde22a221dfe861e8 (patch) | |
tree | 1704ac68da40c79e84d9598b5b4d7b816637d86b /Source/cmMakefileTargetGenerator.cxx | |
parent | 3409e0a777a5ae0306e2165bc518f60a5281b8ca (diff) | |
download | CMake-fd33bf93a5e9d86ee249cc3fde22a221dfe861e8.zip CMake-fd33bf93a5e9d86ee249cc3fde22a221dfe861e8.tar.gz CMake-fd33bf93a5e9d86ee249cc3fde22a221dfe861e8.tar.bz2 |
ENH: fix for bug 6102, allow users to change the compiler
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 70075b1..d3da5bb 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -236,6 +236,18 @@ void cmMakefileTargetGenerator::WriteTargetLanguageFlags() // write language flags for target std::set<cmStdString> languages; this->Target->GetLanguages(languages); + // put the compiler in the rules.make file so that if it changes + // things rebuild + for(std::set<cmStdString>::const_iterator l = languages.begin(); + l != languages.end(); ++l) + { + cmStdString compiler = "CMAKE_"; + compiler += *l; + compiler += "_COMPILER"; + *this->FlagFileStream << "# compile " << l->c_str() << " with " << + this->Makefile->GetSafeDefinition(compiler.c_str()) << "\n"; + } + for(std::set<cmStdString>::const_iterator l = languages.begin(); l != languages.end(); ++l) { |