summaryrefslogtreecommitdiffstats
path: root/Help
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 /Help
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 'Help')
-rw-r--r--Help/manual/cmake-properties.7.rst2
-rw-r--r--Help/manual/cmake-variables.7.rst1
-rw-r--r--Help/prop_sf/Fortran_FORMAT.rst10
-rw-r--r--Help/prop_sf/Fortran_PREPROCESS.rst17
-rw-r--r--Help/prop_tgt/Fortran_PREPROCESS.rst23
-rw-r--r--Help/release/dev/fortran-preprocess-property.rst6
-rw-r--r--Help/variable/CMAKE_Fortran_PREPROCESS.rst8
7 files changed, 63 insertions, 4 deletions
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 4103806..a68170a 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -201,6 +201,7 @@ Properties on Targets
/prop_tgt/FOLDER
/prop_tgt/Fortran_FORMAT
/prop_tgt/Fortran_MODULE_DIRECTORY
+ /prop_tgt/Fortran_PREPROCESS
/prop_tgt/FRAMEWORK
/prop_tgt/FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG
/prop_tgt/FRAMEWORK_VERSION
@@ -466,6 +467,7 @@ Properties on Source Files
/prop_sf/COMPILE_OPTIONS
/prop_sf/EXTERNAL_OBJECT
/prop_sf/Fortran_FORMAT
+ /prop_sf/Fortran_PREPROCESS
/prop_sf/GENERATED
/prop_sf/HEADER_FILE_ONLY
/prop_sf/INCLUDE_DIRECTORIES
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 7d802e1..4ce8365 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -391,6 +391,7 @@ Variables that Control the Build
/variable/CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG
/variable/CMAKE_Fortran_FORMAT
/variable/CMAKE_Fortran_MODULE_DIRECTORY
+ /variable/CMAKE_Fortran_PREPROCESS
/variable/CMAKE_GHS_NO_SOURCE_GROUP_FILE
/variable/CMAKE_GLOBAL_AUTOGEN_TARGET
/variable/CMAKE_GLOBAL_AUTOGEN_TARGET_NAME
diff --git a/Help/prop_sf/Fortran_FORMAT.rst b/Help/prop_sf/Fortran_FORMAT.rst
index 1cbbf48..ef33926 100644
--- a/Help/prop_sf/Fortran_FORMAT.rst
+++ b/Help/prop_sf/Fortran_FORMAT.rst
@@ -4,7 +4,9 @@ Fortran_FORMAT
Set to ``FIXED`` or ``FREE`` to indicate the Fortran source layout.
This property tells CMake whether a given Fortran source file uses
-fixed-format or free-format. CMake will pass the corresponding format
-flag to the compiler. Consider using the target-wide
-:prop_tgt:`Fortran_FORMAT` property if all source files in a target
-share the same format.
+fixed-format or free-format. CMake will pass the corresponding format flag
+to the compiler. Consider using the target-wide :prop_tgt:`Fortran_FORMAT`
+property if all source files in a target share the same format.
+
+.. note:: For some compilers, ``NAG``, ``PGI`` and ``Solaris Studio``,
+ setting this to ``OFF`` will have no effect.
diff --git a/Help/prop_sf/Fortran_PREPROCESS.rst b/Help/prop_sf/Fortran_PREPROCESS.rst
new file mode 100644
index 0000000..25ea827
--- /dev/null
+++ b/Help/prop_sf/Fortran_PREPROCESS.rst
@@ -0,0 +1,17 @@
+Fortran_PREPROCESS
+------------------
+
+Control whether the Fortran source file should be unconditionally preprocessed.
+
+If unset or empty, rely on the compiler to determine whether the file
+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
new file mode 100644
index 0000000..47a15c0
--- /dev/null
+++ b/Help/prop_tgt/Fortran_PREPROCESS.rst
@@ -0,0 +1,23 @@
+Fortran_PREPROCESS
+------------------
+
+Control whether the Fortran source file should be unconditionally
+preprocessed.
+
+If unset or empty, rely on the compiler to determine whether the file
+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
+value is used to initialize this property.
+
+.. note:: For some compilers, ``NAG``, ``PGI`` and ``Solaris Studio``,
+ setting this to ``OFF`` will have no effect.
diff --git a/Help/release/dev/fortran-preprocess-property.rst b/Help/release/dev/fortran-preprocess-property.rst
new file mode 100644
index 0000000..d18e7b8
--- /dev/null
+++ b/Help/release/dev/fortran-preprocess-property.rst
@@ -0,0 +1,6 @@
+fortran-preprocess-property
+---------------------------
+
+* The :prop_tgt:`Fortran_PREPROCESS` target property and
+ :prop_sf:`Fortran_PREPROCESS` source-file property were added to
+ control preprocessing of Fortran source files.
diff --git a/Help/variable/CMAKE_Fortran_PREPROCESS.rst b/Help/variable/CMAKE_Fortran_PREPROCESS.rst
new file mode 100644
index 0000000..74b2d8b
--- /dev/null
+++ b/Help/variable/CMAKE_Fortran_PREPROCESS.rst
@@ -0,0 +1,8 @@
+CMAKE_Fortran_PREPROCESS
+------------------------
+
+Default value for :prop_tgt:`Fortran_PREPROCESS` of targets.
+
+This variable is used to initialize the :prop_tgt:`Fortran_PREPROCESS`
+property on all the targets. See that target property for additional
+information.