summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorPeter Hill <peter.hill@york.ac.uk>2022-02-18 18:02:10 (GMT)
committerBrad King <brad.king@kitware.com>2022-02-24 17:54:46 (GMT)
commit6b4885b58b8204153919d068363f5fe42fef6ec4 (patch)
treeedade93517a30c3a64c7b1d64d3c29063ac9634f /Source/cmNinjaTargetGenerator.cxx
parent352ea99bbacf6e57bca47f43725d98b2a4a0b87d (diff)
downloadCMake-6b4885b58b8204153919d068363f5fe42fef6ec4.zip
CMake-6b4885b58b8204153919d068363f5fe42fef6ec4.tar.gz
CMake-6b4885b58b8204153919d068363f5fe42fef6ec4.tar.bz2
Ninja: Avoid preprocessing twice with explicit Fortran_PREPROCESS
Fix spurious warnings from gfortran+Ninja for preprocessing. Fixes: #23248
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 191b428..dd7d244 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -216,7 +216,8 @@ std::string cmNinjaTargetGenerator::ComputeFlagsForObject(
// Add Fortran format flags.
if (language == "Fortran") {
this->AppendFortranFormatFlags(flags, *source);
- this->AppendFortranPreprocessFlags(flags, *source);
+ this->AppendFortranPreprocessFlags(flags, *source,
+ PreprocessFlagsRequired::NO);
}
// Add source file specific flags.