summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-05-22 14:34:53 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-05-22 14:35:10 (GMT)
commit62816ff88c6d1bd8d1c00de5ed448ee915d69e00 (patch)
tree6f1eb5d7c8b7deee02da84d309b446d5f6f38db5 /Source/cmLocalVisualStudio7Generator.cxx
parent1b0049680b09872f01f714c8dcb1ed3c5c21da25 (diff)
parent3888de23daca814d66a40642d3e369a5c4747131 (diff)
downloadCMake-62816ff88c6d1bd8d1c00de5ed448ee915d69e00.zip
CMake-62816ff88c6d1bd8d1c00de5ed448ee915d69e00.tar.gz
CMake-62816ff88c6d1bd8d1c00de5ed448ee915d69e00.tar.bz2
Merge topic 'fortran-preprocess-property'
3888de23da Ninja: Skip Fortran preprocessing if Fortran_PREPROCESS is OFF 66c4e87282 Ninja: Add helper functions to generate Fortran build 5cca1ec893 Ninja: Add helper functions to generate Fortran preprocess rule b0a6161190 Fortran: Add Fortran_PREPROCESS property Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4659
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 0b02724..5d50e2d 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -283,6 +283,7 @@ void cmLocalVisualStudio7Generator::WriteConfigurations(
}
cmVS7FlagTable cmLocalVisualStudio7GeneratorFortranFlagTable[] = {
{ "Preprocess", "fpp", "Run Preprocessor on files", "preprocessYes", 0 },
+ { "Preprocess", "nofpp", "Run Preprocessor on files", "preprocessNo", 0 },
{ "SuppressStartupBanner", "nologo", "SuppressStartupBanner", "true", 0 },
{ "SourceFileFormat", "fixed", "Use Fixed Format", "fileFormatFixed", 0 },
{ "SourceFileFormat", "free", "Use Free Format", "fileFormatFree", 0 },
@@ -681,6 +682,18 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(
default:
break;
}
+
+ switch (cmOutputConverter::GetFortranPreprocess(
+ target->GetSafeProperty("Fortran_PREPROCESS"))) {
+ case cmOutputConverter::FortranPreprocess::Needed:
+ flags += " -fpp";
+ break;
+ case cmOutputConverter::FortranPreprocess::NotNeeded:
+ flags += " -nofpp";
+ break;
+ default:
+ break;
+ }
}
// Get preprocessor definitions for this directory.
@@ -1473,6 +1486,20 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo(
}
if (lg->FortranProject) {
+ switch (cmOutputConverter::GetFortranPreprocess(
+ sf.GetSafeProperty("Fortran_PREPROCESS"))) {
+ case cmOutputConverter::FortranPreprocess::Needed:
+ fc.CompileFlags = cmStrCat("-fpp ", fc.CompileFlags);
+ needfc = true;
+ break;
+ case cmOutputConverter::FortranPreprocess::NotNeeded:
+ fc.CompileFlags = cmStrCat("-nofpp ", fc.CompileFlags);
+ needfc = true;
+ break;
+ default:
+ break;
+ }
+
switch (cmOutputConverter::GetFortranFormat(
sf.GetSafeProperty("Fortran_FORMAT"))) {
case cmOutputConverter::FortranFormatFixed: