summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-11-12 14:47:35 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-11-12 14:47:44 (GMT)
commit55f7df4961ef3ae4dd01eaae3be149f5c8798e11 (patch)
treed82b8a6c7ea4e4df443b35946cfb00c28da07c4e
parent2af4841428b7d7e5303d0a0afc3e55958214e22c (diff)
parent665954fa8d2d2e0a74aab78b7d739c0feae5211b (diff)
downloadCMake-55f7df4961ef3ae4dd01eaae3be149f5c8798e11.zip
CMake-55f7df4961ef3ae4dd01eaae3be149f5c8798e11.tar.gz
CMake-55f7df4961ef3ae4dd01eaae3be149f5c8798e11.tar.bz2
Merge topic 'objc-standard-docs'
665954fa8d ObjC: Document ObjC/ObjCXX standard properties / variables Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4031
-rw-r--r--Help/command/try_compile.rst11
-rw-r--r--Help/manual/cmake-properties.7.rst6
-rw-r--r--Help/manual/cmake-variables.7.rst6
-rw-r--r--Help/prop_tgt/OBJCXX_EXTENSIONS.rst20
-rw-r--r--Help/prop_tgt/OBJCXX_STANDARD.rst35
-rw-r--r--Help/prop_tgt/OBJCXX_STANDARD_REQUIRED.rst20
-rw-r--r--Help/prop_tgt/OBJC_EXTENSIONS.rst20
-rw-r--r--Help/prop_tgt/OBJC_STANDARD.rst35
-rw-r--r--Help/prop_tgt/OBJC_STANDARD_REQUIRED.rst20
-rw-r--r--Help/variable/CMAKE_OBJCXX_EXTENSIONS.rst11
-rw-r--r--Help/variable/CMAKE_OBJCXX_STANDARD.rst11
-rw-r--r--Help/variable/CMAKE_OBJCXX_STANDARD_REQUIRED.rst11
-rw-r--r--Help/variable/CMAKE_OBJC_EXTENSIONS.rst11
-rw-r--r--Help/variable/CMAKE_OBJC_STANDARD.rst11
-rw-r--r--Help/variable/CMAKE_OBJC_STANDARD_REQUIRED.rst11
15 files changed, 238 insertions, 1 deletions
diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst
index 0bc2ca3..edbf92c 100644
--- a/Help/command/try_compile.rst
+++ b/Help/command/try_compile.rst
@@ -103,15 +103,18 @@ The options are:
``<LANG>_STANDARD <std>``
Specify the :prop_tgt:`C_STANDARD`, :prop_tgt:`CXX_STANDARD`,
+ :prop_tgt:`OBJC_STANDARD`, :prop_tgt:`OBJCXX_STANDARD`,
or :prop_tgt:`CUDA_STANDARD` target property of the generated project.
``<LANG>_STANDARD_REQUIRED <bool>``
Specify the :prop_tgt:`C_STANDARD_REQUIRED`,
- :prop_tgt:`CXX_STANDARD_REQUIRED`, or :prop_tgt:`CUDA_STANDARD_REQUIRED`
+ :prop_tgt:`CXX_STANDARD_REQUIRED`, :prop_tgt:`OBJC_STANDARD_REQUIRED`,
+ :prop_tgt:`OBJCXX_STANDARD_REQUIRED`,or :prop_tgt:`CUDA_STANDARD_REQUIRED`
target property of the generated project.
``<LANG>_EXTENSIONS <bool>``
Specify the :prop_tgt:`C_EXTENSIONS`, :prop_tgt:`CXX_EXTENSIONS`,
+ :prop_tgt:`OBJC_EXTENSIONS`, :prop_tgt:`OBJCXX_EXTENSIONS`,
or :prop_tgt:`CUDA_EXTENSIONS` target property of the generated project.
In this version all files in ``<bindir>/CMakeFiles/CMakeTmp`` will be
@@ -171,6 +174,12 @@ then the language standard variables are honored:
* :variable:`CMAKE_CXX_STANDARD`
* :variable:`CMAKE_CXX_STANDARD_REQUIRED`
* :variable:`CMAKE_CXX_EXTENSIONS`
+* :variable:`CMAKE_OBJC_STANDARD`
+* :variable:`CMAKE_OBJC_STANDARD_REQUIRED`
+* :variable:`CMAKE_OBJC_EXTENSIONS`
+* :variable:`CMAKE_OBJCXX_STANDARD`
+* :variable:`CMAKE_OBJCXX_STANDARD_REQUIRED`
+* :variable:`CMAKE_OBJCXX_EXTENSIONS`
* :variable:`CMAKE_CUDA_STANDARD`
* :variable:`CMAKE_CUDA_STANDARD_REQUIRED`
* :variable:`CMAKE_CUDA_EXTENSIONS`
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 675b65c..94d08c6 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -289,6 +289,12 @@ Properties on Targets
/prop_tgt/NAME
/prop_tgt/NO_SONAME
/prop_tgt/NO_SYSTEM_FROM_IMPORTED
+ /prop_tgt/OBJC_EXTENSIONS
+ /prop_tgt/OBJC_STANDARD
+ /prop_tgt/OBJC_STANDARD_REQUIRED
+ /prop_tgt/OBJCXX_EXTENSIONS
+ /prop_tgt/OBJCXX_STANDARD
+ /prop_tgt/OBJCXX_STANDARD_REQUIRED
/prop_tgt/OSX_ARCHITECTURES_CONFIG
/prop_tgt/OSX_ARCHITECTURES
/prop_tgt/OUTPUT_NAME_CONFIG
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 84018b7..01dd5fd 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -534,6 +534,12 @@ Variables for Languages
/variable/CMAKE_LANG_SOURCE_FILE_EXTENSIONS
/variable/CMAKE_LANG_STANDARD_INCLUDE_DIRECTORIES
/variable/CMAKE_LANG_STANDARD_LIBRARIES
+ /variable/CMAKE_OBJC_EXTENSIONS
+ /variable/CMAKE_OBJC_STANDARD
+ /variable/CMAKE_OBJC_STANDARD_REQUIRED
+ /variable/CMAKE_OBJCXX_EXTENSIONS
+ /variable/CMAKE_OBJCXX_STANDARD
+ /variable/CMAKE_OBJCXX_STANDARD_REQUIRED
/variable/CMAKE_Swift_LANGUAGE_VERSION
/variable/CMAKE_USER_MAKE_RULES_OVERRIDE_LANG
diff --git a/Help/prop_tgt/OBJCXX_EXTENSIONS.rst b/Help/prop_tgt/OBJCXX_EXTENSIONS.rst
new file mode 100644
index 0000000..9f9d804
--- /dev/null
+++ b/Help/prop_tgt/OBJCXX_EXTENSIONS.rst
@@ -0,0 +1,20 @@
+OBJCXX_EXTENSIONS
+-----------------
+
+Boolean specifying whether compiler specific extensions are requested.
+
+This property specifies whether compiler specific extensions should be
+used. For some compilers, this results in adding a flag such
+as ``-std=gnu++11`` instead of ``-std=c++11`` to the compile line. This
+property is ``ON`` by default. The basic ObjC++ standard level is
+controlled by the :prop_tgt:`OBJCXX_STANDARD` target property.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
+
+If the property is not set, and the project has set the :prop_tgt:`CXX_EXTENSIONS`,
+the value of :prop_tgt:`CXX_EXTENSIONS` is set for :prop_tgt:`OBJCXX_EXTENSIONS`.
+
+This property is initialized by the value of
+the :variable:`CMAKE_OBJCXX_EXTENSIONS` variable if it is set when a target
+is created.
diff --git a/Help/prop_tgt/OBJCXX_STANDARD.rst b/Help/prop_tgt/OBJCXX_STANDARD.rst
new file mode 100644
index 0000000..3c925dc
--- /dev/null
+++ b/Help/prop_tgt/OBJCXX_STANDARD.rst
@@ -0,0 +1,35 @@
+OBJCXX_STANDARD
+---------------
+
+The ObjC++ standard whose features are requested to build this target.
+
+This property specifies the ObjC++ standard whose features are requested
+to build this target. For some compilers, this results in adding a
+flag such as ``-std=gnu++11`` to the compile line.
+
+Supported values are ``98``, ``11``, ``14``, ``17``, and ``20``.
+
+If the value requested does not result in a compile flag being added for
+the compiler in use, a previous standard flag will be added instead. This
+means that using:
+
+.. code-block:: cmake
+
+ set_property(TARGET tgt PROPERTY OBJCXX_STANDARD 11)
+
+with a compiler which does not support ``-std=gnu++11`` or an equivalent
+flag will not result in an error or warning, but will instead add the
+``-std=gnu++98`` flag if supported. This "decay" behavior may be controlled
+with the :prop_tgt:`OBJCXX_STANDARD_REQUIRED` target property.
+Additionally, the :prop_tgt:`OBJCXX_EXTENSIONS` target property may be used to
+control whether compiler-specific extensions are enabled on a per-target basis.
+
+If the property is not set, and the project has set the :prop_tgt:`CXX_STANDARD`,
+the value of :prop_tgt:`CXX_STANDARD` is set for :prop_tgt:`OBJCXX_STANDARD`.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
+
+This property is initialized by the value of
+the :variable:`CMAKE_OBJCXX_STANDARD` variable if it is set when a target
+is created.
diff --git a/Help/prop_tgt/OBJCXX_STANDARD_REQUIRED.rst b/Help/prop_tgt/OBJCXX_STANDARD_REQUIRED.rst
new file mode 100644
index 0000000..c330abf
--- /dev/null
+++ b/Help/prop_tgt/OBJCXX_STANDARD_REQUIRED.rst
@@ -0,0 +1,20 @@
+OBJCXX_STANDARD_REQUIRED
+------------------------
+
+Boolean describing whether the value of :prop_tgt:`OBJCXX_STANDARD` is a requirement.
+
+If this property is set to ``ON``, then the value of the
+:prop_tgt:`OBJCXX_STANDARD` target property is treated as a requirement. If this
+property is ``OFF`` or unset, the :prop_tgt:`OBJCXX_STANDARD` target property is
+treated as optional and may "decay" to a previous standard if the requested is
+not available.
+
+If the property is not set, and the project has set the :prop_tgt:`CXX_STANDARD_REQUIRED`,
+the value of :prop_tgt:`CXX_STANDARD_REQUIRED` is set for :prop_tgt:`OBJCXX_STANDARD_REQUIRED`.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
+
+This property is initialized by the value of
+the :variable:`CMAKE_OBJCXX_STANDARD_REQUIRED` variable if it is set when a
+target is created.
diff --git a/Help/prop_tgt/OBJC_EXTENSIONS.rst b/Help/prop_tgt/OBJC_EXTENSIONS.rst
new file mode 100644
index 0000000..2de9e48
--- /dev/null
+++ b/Help/prop_tgt/OBJC_EXTENSIONS.rst
@@ -0,0 +1,20 @@
+OBJC_EXTENSIONS
+---------------
+
+Boolean specifying whether compiler specific extensions are requested.
+
+This property specifies whether compiler specific extensions should be
+used. For some compilers, this results in adding a flag such
+as ``-std=gnu11`` instead of ``-std=c11`` to the compile line. This
+property is ``ON`` by default. The basic OBJC standard level is
+controlled by the :prop_tgt:`OBJC_STANDARD` target property.
+
+If the property is not set, and the project has set the :prop_tgt:`C_EXTENSIONS`,
+the value of :prop_tgt:`C_EXTENSIONS` is set for :prop_tgt:`OBJC_EXTENSIONS`.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
+
+This property is initialized by the value of
+the :variable:`CMAKE_OBJC_EXTENSIONS` variable if it is set when a target
+is created.
diff --git a/Help/prop_tgt/OBJC_STANDARD.rst b/Help/prop_tgt/OBJC_STANDARD.rst
new file mode 100644
index 0000000..d1e1b24
--- /dev/null
+++ b/Help/prop_tgt/OBJC_STANDARD.rst
@@ -0,0 +1,35 @@
+OBJC_STANDARD
+-------------
+
+The OBJC standard whose features are requested to build this target.
+
+This property specifies the OBJC standard whose features are requested
+to build this target. For some compilers, this results in adding a
+flag such as ``-std=gnu11`` to the compile line.
+
+Supported values are ``90``, ``99`` and ``11``.
+
+If the value requested does not result in a compile flag being added for
+the compiler in use, a previous standard flag will be added instead. This
+means that using:
+
+.. code-block:: cmake
+
+ set_property(TARGET tgt PROPERTY OBJC_STANDARD 11)
+
+with a compiler which does not support ``-std=gnu11`` or an equivalent
+flag will not result in an error or warning, but will instead add the
+``-std=gnu99`` or ``-std=gnu90`` flag if supported. This "decay" behavior may
+be controlled with the :prop_tgt:`OBJC_STANDARD_REQUIRED` target property.
+Additionally, the :prop_tgt:`OBJC_EXTENSIONS` target property may be used to
+control whether compiler-specific extensions are enabled on a per-target basis.
+
+If the property is not set, and the project has set the :prop_tgt:`C_STANDARD`,
+the value of :prop_tgt:`C_STANDARD` is set for :prop_tgt:`OBJC_STANDARD`.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
+
+This property is initialized by the value of
+the :variable:`CMAKE_OBJC_STANDARD` variable if it is set when a target
+is created.
diff --git a/Help/prop_tgt/OBJC_STANDARD_REQUIRED.rst b/Help/prop_tgt/OBJC_STANDARD_REQUIRED.rst
new file mode 100644
index 0000000..8cf377c
--- /dev/null
+++ b/Help/prop_tgt/OBJC_STANDARD_REQUIRED.rst
@@ -0,0 +1,20 @@
+OBJC_STANDARD_REQUIRED
+----------------------
+
+Boolean describing whether the value of :prop_tgt:`OBJC_STANDARD` is a requirement.
+
+If this property is set to ``ON``, then the value of the
+:prop_tgt:`OBJC_STANDARD` target property is treated as a requirement. If this
+property is ``OFF`` or unset, the :prop_tgt:`OBJC_STANDARD` target property is
+treated as optional and may "decay" to a previous standard if the requested is
+not available.
+
+If the property is not set, and the project has set the :prop_tgt:`C_STANDARD_REQUIRED`,
+the value of :prop_tgt:`C_STANDARD_REQUIRED` is set for :prop_tgt:`OBJC_STANDARD_REQUIRED`.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
+
+This property is initialized by the value of
+the :variable:`CMAKE_OBJC_STANDARD_REQUIRED` variable if it is set when a
+target is created.
diff --git a/Help/variable/CMAKE_OBJCXX_EXTENSIONS.rst b/Help/variable/CMAKE_OBJCXX_EXTENSIONS.rst
new file mode 100644
index 0000000..8afa6f2
--- /dev/null
+++ b/Help/variable/CMAKE_OBJCXX_EXTENSIONS.rst
@@ -0,0 +1,11 @@
+CMAKE_OBJCXX_EXTENSIONS
+-----------------------
+
+Default value for :prop_tgt:`OBJCXX_EXTENSIONS` property of targets.
+
+This variable is used to initialize the :prop_tgt:`OBJCXX_EXTENSIONS`
+property on all targets. See that target property for additional
+information.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_OBJCXX_STANDARD.rst b/Help/variable/CMAKE_OBJCXX_STANDARD.rst
new file mode 100644
index 0000000..4e5016a
--- /dev/null
+++ b/Help/variable/CMAKE_OBJCXX_STANDARD.rst
@@ -0,0 +1,11 @@
+CMAKE_OBJCXX_STANDARD
+---------------------
+
+Default value for :prop_tgt:`OBJCXX_STANDARD` property of targets.
+
+This variable is used to initialize the :prop_tgt:`OBJCXX_STANDARD`
+property on all targets. See that target property for additional
+information.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_OBJCXX_STANDARD_REQUIRED.rst b/Help/variable/CMAKE_OBJCXX_STANDARD_REQUIRED.rst
new file mode 100644
index 0000000..3a0602a
--- /dev/null
+++ b/Help/variable/CMAKE_OBJCXX_STANDARD_REQUIRED.rst
@@ -0,0 +1,11 @@
+CMAKE_OBJCXX_STANDARD_REQUIRED
+------------------------------
+
+Default value for :prop_tgt:`OBJCXX_STANDARD_REQUIRED` property of targets.
+
+This variable is used to initialize the :prop_tgt:`OBJCXX_STANDARD_REQUIRED`
+property on all targets. See that target property for additional
+information.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_OBJC_EXTENSIONS.rst b/Help/variable/CMAKE_OBJC_EXTENSIONS.rst
new file mode 100644
index 0000000..d9619d8
--- /dev/null
+++ b/Help/variable/CMAKE_OBJC_EXTENSIONS.rst
@@ -0,0 +1,11 @@
+CMAKE_OBJC_EXTENSIONS
+---------------------
+
+Default value for :prop_tgt:`OBJC_EXTENSIONS` property of targets.
+
+This variable is used to initialize the :prop_tgt:`OBJC_EXTENSIONS`
+property on all targets. See that target property for additional
+information.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_OBJC_STANDARD.rst b/Help/variable/CMAKE_OBJC_STANDARD.rst
new file mode 100644
index 0000000..976c441
--- /dev/null
+++ b/Help/variable/CMAKE_OBJC_STANDARD.rst
@@ -0,0 +1,11 @@
+CMAKE_OBJC_STANDARD
+-------------------
+
+Default value for :prop_tgt:`OBJC_STANDARD` property of targets.
+
+This variable is used to initialize the :prop_tgt:`OBJC_STANDARD`
+property on all targets. See that target property for additional
+information.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_OBJC_STANDARD_REQUIRED.rst b/Help/variable/CMAKE_OBJC_STANDARD_REQUIRED.rst
new file mode 100644
index 0000000..5c02096
--- /dev/null
+++ b/Help/variable/CMAKE_OBJC_STANDARD_REQUIRED.rst
@@ -0,0 +1,11 @@
+CMAKE_OBJC_STANDARD_REQUIRED
+----------------------------
+
+Default value for :prop_tgt:`OBJC_STANDARD_REQUIRED` property of targets.
+
+This variable is used to initialize the :prop_tgt:`OBJC_STANDARD_REQUIRED`
+property on all targets. See that target property for additional
+information.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.