summaryrefslogtreecommitdiffstats
path: root/Help/prop_tgt
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)
commit88e0dca40df9c88e7d9b9d352fe19f63091bc7c3 (patch)
tree3d1ff2d0e12eb15a11f04980c949a0d0c84b29c6 /Help/prop_tgt
parentb197d20c083da1cbfd32e79c4a4c8f36de3a6aae (diff)
parent665954fa8d2d2e0a74aab78b7d739c0feae5211b (diff)
downloadCMake-88e0dca40df9c88e7d9b9d352fe19f63091bc7c3.zip
CMake-88e0dca40df9c88e7d9b9d352fe19f63091bc7c3.tar.gz
CMake-88e0dca40df9c88e7d9b9d352fe19f63091bc7c3.tar.bz2
Merge topic 'objc-standard-docs' into release-3.16
665954fa8d ObjC: Document ObjC/ObjCXX standard properties / variables Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4031
Diffstat (limited to 'Help/prop_tgt')
-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
6 files changed, 150 insertions, 0 deletions
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.