diff options
author | David Cole <david.cole@kitware.com> | 2011-09-07 19:37:27 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-09-07 19:37:27 (GMT) |
commit | d9ad72542ae60b34d1b0debd3fd4616d9896985f (patch) | |
tree | cc47cb616e9d1619896d518a1c96a008d079c354 /Source/cmGlobalXCodeGenerator.cxx | |
parent | 103ab60dd7314f6a75b02dc65d40a99efedc5391 (diff) | |
parent | 90efed6ee60fde3a1211672854f7e23affa8b983 (diff) | |
download | CMake-d9ad72542ae60b34d1b0debd3fd4616d9896985f.zip CMake-d9ad72542ae60b34d1b0debd3fd4616d9896985f.tar.gz CMake-d9ad72542ae60b34d1b0debd3fd4616d9896985f.tar.bz2 |
Merge topic 'fortran-format'
90efed6 Xcode: Honor Fortran_FORMAT target and source file property
5c0c635 Fortran: Add support for free- and fixed-form flags
47a0c75 VS: Map Fortran free- and fixed-format flags to IDE options
d6e2a06 VS: Map per-source Fortran flags to IDE options
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index e3bae76..690dabb 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -582,6 +582,13 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg, { lg->AppendFlags(flags, cmtarget.GetProperty("COMPILE_FLAGS")); } + const char* srcfmt = sf->GetProperty("Fortran_FORMAT"); + switch(this->CurrentLocalGenerator->GetFortranFormat(srcfmt)) + { + case cmLocalGenerator::FortranFormatFixed: flags="-fixed "+flags; break; + case cmLocalGenerator::FortranFormatFree: flags="-free "+flags; break; + default: break; + } lg->AppendFlags(flags, sf->GetProperty("COMPILE_FLAGS")); // Add per-source definitions. @@ -1904,6 +1911,21 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, this->CreateString(flags.c_str())); } + // Add Fortran source format attribute if property is set. + const char* format = 0; + const char* tgtfmt = target.GetProperty("Fortran_FORMAT"); + switch(this->CurrentLocalGenerator->GetFortranFormat(tgtfmt)) + { + case cmLocalGenerator::FortranFormatFixed: format = "fixed"; break; + case cmLocalGenerator::FortranFormatFree: format = "free"; break; + default: break; + } + if(format) + { + buildSettings->AddAttribute("IFORT_LANG_SRCFMT", + this->CreateString(format)); + } + // Create the INSTALL_PATH attribute. std::string install_name_dir; if(target.GetType() == cmTarget::SHARED_LIBRARY) |