diff options
author | Brad King <brad.king@kitware.com> | 2015-07-09 13:54:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-09 13:54:56 (GMT) |
commit | 6a56740e27fe74b757ff48999a2f152816ee8e52 (patch) | |
tree | e1edebccb7ea16b4007df5144ec80e3acce46fd5 | |
parent | 058074d499805aa4579c8986b84459f9993f6fad (diff) | |
download | CMake-6a56740e27fe74b757ff48999a2f152816ee8e52.zip CMake-6a56740e27fe74b757ff48999a2f152816ee8e52.tar.gz CMake-6a56740e27fe74b757ff48999a2f152816ee8e52.tar.bz2 |
cmNinjaTargetGenerator: Add Fortran flag generation
Make ComputeFlagsForObject consistent with the Makefile generator
in regard to Fortran flags.
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 948840a..7d3962a 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -110,13 +110,6 @@ std::string cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile const* source, const std::string& language) { - // TODO: Fortran support. - // // Fortran-specific flags computed for this target. - // if(*l == "Fortran") - // { - // this->AddFortranFlags(flags); - // } - bool hasLangCached = this->LanguageFlags.count(language) != 0; std::string& languageFlags = this->LanguageFlags[language]; if(!hasLangCached) @@ -128,6 +121,12 @@ cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile const* source, language, this->GetConfigName()); + // Fortran-specific flags computed for this target. + if(language == "Fortran") + { + this->AddFortranFlags(languageFlags); + } + // Add shared-library flags if needed. this->LocalGenerator->AddCMP0018Flags(languageFlags, this->Target, language, @@ -166,6 +165,12 @@ cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile const* source, std::string flags = languageFlags; + // Add Fortran format flags. + if(language == "Fortran") + { + this->AppendFortranFormatFlags(flags, *source); + } + // Add source file specific flags. this->LocalGenerator->AppendFlags(flags, source->GetProperty("COMPILE_FLAGS")); |