diff options
author | Peter Hill <peter.hill@york.ac.uk> | 2022-02-18 18:02:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-02-24 17:54:46 (GMT) |
commit | 6b4885b58b8204153919d068363f5fe42fef6ec4 (patch) | |
tree | edade93517a30c3a64c7b1d64d3c29063ac9634f /Source/cmCommonTargetGenerator.h | |
parent | 352ea99bbacf6e57bca47f43725d98b2a4a0b87d (diff) | |
download | CMake-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/cmCommonTargetGenerator.h')
-rw-r--r-- | Source/cmCommonTargetGenerator.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h index baa36c9..5aba1c6 100644 --- a/Source/cmCommonTargetGenerator.h +++ b/Source/cmCommonTargetGenerator.h @@ -46,8 +46,14 @@ protected: void AppendFortranFormatFlags(std::string& flags, cmSourceFile const& source); - void AppendFortranPreprocessFlags(std::string& flags, - cmSourceFile const& source); + enum class PreprocessFlagsRequired + { + YES, + NO + }; + void AppendFortranPreprocessFlags( + std::string& flags, cmSourceFile const& source, + PreprocessFlagsRequired requires_pp = PreprocessFlagsRequired::YES); virtual void AddIncludeFlags(std::string& flags, std::string const& lang, const std::string& config) = 0; |