summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorPeter Hill <zed.three@gmail.com>2020-05-08 11:25:57 (GMT)
committerBrad King <brad.king@kitware.com>2020-05-21 15:46:32 (GMT)
commit3888de23daca814d66a40642d3e369a5c4747131 (patch)
tree5cd424b87c1a866453f8e7fe27b37ad24931b4e9 /Help
parent66c4e87282176328bc2764afd53015dffd42d7f5 (diff)
downloadCMake-3888de23daca814d66a40642d3e369a5c4747131.zip
CMake-3888de23daca814d66a40642d3e369a5c4747131.tar.gz
CMake-3888de23daca814d66a40642d3e369a5c4747131.tar.bz2
Ninja: Skip Fortran preprocessing if Fortran_PREPROCESS is OFF
If `Fortran_PREPROCESS` is explicitly turned off for a source file then we know it does not need to be preprocessed. Teach the Ninja generator to skip preprocessing in this case. Otherwise we still must preprocess just in case. Fixes: #18870
Diffstat (limited to 'Help')
-rw-r--r--Help/prop_sf/Fortran_PREPROCESS.rst5
-rw-r--r--Help/prop_tgt/Fortran_PREPROCESS.rst5
2 files changed, 10 insertions, 0 deletions
diff --git a/Help/prop_sf/Fortran_PREPROCESS.rst b/Help/prop_sf/Fortran_PREPROCESS.rst
index 92542d9..25ea827 100644
--- a/Help/prop_sf/Fortran_PREPROCESS.rst
+++ b/Help/prop_sf/Fortran_PREPROCESS.rst
@@ -8,5 +8,10 @@ should be preprocessed. If explicitly set to ``OFF`` then the file
does not need to be preprocessed. If explicitly set to ``ON``, then
the file does need to be preprocessed as part of the compilation step.
+When using the :generator:`Ninja` generator, all source files are
+first preprocessed in order to generate module dependency
+information. Setting this property to ``OFF`` will make ``Ninja``
+skip this step.
+
Consider using the target-wide :prop_tgt:`Fortran_PREPROCESS` property
if all source files in a target need to be preprocessed.
diff --git a/Help/prop_tgt/Fortran_PREPROCESS.rst b/Help/prop_tgt/Fortran_PREPROCESS.rst
index 069d04a..47a15c0 100644
--- a/Help/prop_tgt/Fortran_PREPROCESS.rst
+++ b/Help/prop_tgt/Fortran_PREPROCESS.rst
@@ -9,6 +9,11 @@ should be preprocessed. If explicitly set to ``OFF`` then the file does not
need to be preprocessed. If explicitly set to ``ON``, then the file does
need to be preprocessed as part of the compilation step.
+When using the :generator:`Ninja` generator, all source files are
+first preprocessed in order to generate module dependency
+information. Setting this property to ``OFF`` will make ``Ninja``
+skip this step.
+
Use the source-specific :prop_sf:`Fortran_PREPROCESS` property if a single
file needs to be preprocessed. If the variable
:variable:`CMAKE_Fortran_PREPROCESS` is set when a target is created its