summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-developer.7.rst7
-rw-r--r--Help/manual/cmake-policies.7.rst8
-rw-r--r--Help/policy/CMP0066.rst27
-rw-r--r--Help/prop_tgt/CXX_EXTENSIONS.rst3
-rw-r--r--Help/prop_tgt/CXX_STANDARD.rst2
-rw-r--r--Help/prop_tgt/C_EXTENSIONS.rst3
-rw-r--r--Help/prop_tgt/C_STANDARD.rst2
-rw-r--r--Help/prop_tgt/FRAMEWORK.rst4
-rw-r--r--Help/prop_tgt/SOVERSION.rst25
-rw-r--r--Help/prop_tgt/VERSION.rst27
-rw-r--r--Help/release/3.6.rst5
-rw-r--r--Help/release/dev/GenerateExportHeader-custom-content.rst6
-rw-r--r--Help/release/dev/try_compile-config-flags.rst7
-rw-r--r--Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst2
-rw-r--r--Help/variable/CMAKE_TRY_COMPILE_PLATFORM_VARIABLES.rst16
15 files changed, 121 insertions, 23 deletions
diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst
index 7bfdcad..afaccc6 100644
--- a/Help/manual/cmake-developer.7.rst
+++ b/Help/manual/cmake-developer.7.rst
@@ -24,9 +24,10 @@ to build with such toolchains.
std::auto_ptr
-------------
-Some implementations have a ``std::auto_ptr`` which can not be used as a
-return value from a function. ``std::auto_ptr`` may not be used. Use
-``cmsys::auto_ptr`` instead.
+The ``std::auto_ptr`` template is deprecated in C++11. We want to use it
+so we can build on C++98 compilers but we do not want to turn off compiler
+warnings about deprecated interfaces in general. Use the ``CM_AUTO_PTR``
+macro instead.
size_t
------
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index 43f4637..0cfe983 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -51,6 +51,14 @@ The :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable may also be used
to determine whether to report an error on use of deprecated macros or
functions.
+Policies Introduced by CMake 3.7
+================================
+
+.. toctree::
+ :maxdepth: 1
+
+ CMP0066: Honor per-config flags in try_compile() source-file signature. </policy/CMP0066>
+
Policies Introduced by CMake 3.4
================================
diff --git a/Help/policy/CMP0066.rst b/Help/policy/CMP0066.rst
new file mode 100644
index 0000000..d1dcb0e
--- /dev/null
+++ b/Help/policy/CMP0066.rst
@@ -0,0 +1,27 @@
+CMP0066
+-------
+
+Honor per-config flags in :command:`try_compile` source-file signature.
+
+The source file signature of the :command:`try_compile` command uses the value
+of the :variable:`CMAKE_<LANG>_FLAGS` variable in the test project so that the
+test compilation works as it would in the main project. However, CMake 3.6 and
+below do not also honor config-specific compiler flags such as those in the
+:variable:`CMAKE_<LANG>_FLAGS_DEBUG` variable. CMake 3.7 and above prefer to
+honor config-specific compiler flags too. This policy provides compatibility
+for projects that do not expect config-specific compiler flags to be used.
+
+The ``OLD`` behavior of this policy is to ignore config-specific flag
+variables like :variable:`CMAKE_<LANG>_FLAGS_DEBUG` and only use CMake's
+built-in defaults for the current compiler and platform.
+
+The ``NEW`` behavior of this policy is to honor config-specific flag
+variabldes like :variable:`CMAKE_<LANG>_FLAGS_DEBUG`.
+
+This policy was introduced in CMake version 3.7. Unlike most policies,
+CMake version |release| does *not* warn by default when this policy
+is not set and simply uses OLD behavior. See documentation of the
+:variable:`CMAKE_POLICY_WARNING_CMP0066 <CMAKE_POLICY_WARNING_CMP<NNNN>>`
+variable to control the warning.
+
+.. include:: DEPRECATED.txt
diff --git a/Help/prop_tgt/CXX_EXTENSIONS.rst b/Help/prop_tgt/CXX_EXTENSIONS.rst
index 0f547e2..280bb3a 100644
--- a/Help/prop_tgt/CXX_EXTENSIONS.rst
+++ b/Help/prop_tgt/CXX_EXTENSIONS.rst
@@ -6,7 +6,8 @@ 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.
+property is ``ON`` by default. The basic C++ standard level is
+controlled by the :prop_tgt:`CXX_STANDARD` target property.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/prop_tgt/CXX_STANDARD.rst b/Help/prop_tgt/CXX_STANDARD.rst
index edc9ba5..5b186c1 100644
--- a/Help/prop_tgt/CXX_STANDARD.rst
+++ b/Help/prop_tgt/CXX_STANDARD.rst
@@ -22,6 +22,8 @@ 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:`CXX_STANDARD_REQUIRED` target property.
+Additionally, the :prop_tgt:`CXX_EXTENSIONS` target property may be used to
+control whether compiler-specific extensions are enabled on a per-target basis.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/prop_tgt/C_EXTENSIONS.rst b/Help/prop_tgt/C_EXTENSIONS.rst
index fce67f4..05b14ce 100644
--- a/Help/prop_tgt/C_EXTENSIONS.rst
+++ b/Help/prop_tgt/C_EXTENSIONS.rst
@@ -6,7 +6,8 @@ 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.
+property is ``ON`` by default. The basic C standard level is
+controlled by the :prop_tgt:`C_STANDARD` target property.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/prop_tgt/C_STANDARD.rst b/Help/prop_tgt/C_STANDARD.rst
index 5e36821..815a686 100644
--- a/Help/prop_tgt/C_STANDARD.rst
+++ b/Help/prop_tgt/C_STANDARD.rst
@@ -22,6 +22,8 @@ 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:`C_STANDARD_REQUIRED` target property.
+Additionally, the :prop_tgt:`C_EXTENSIONS` target property may be used to
+control whether compiler-specific extensions are enabled on a per-target basis.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/prop_tgt/FRAMEWORK.rst b/Help/prop_tgt/FRAMEWORK.rst
index 6c212c3..8120c36 100644
--- a/Help/prop_tgt/FRAMEWORK.rst
+++ b/Help/prop_tgt/FRAMEWORK.rst
@@ -26,6 +26,10 @@ Example of creation ``dynamicFramework``:
FRAMEWORK_VERSION C
MACOSX_FRAMEWORK_IDENTIFIER com.cmake.dynamicFramework
MACOSX_FRAMEWORK_INFO_PLIST Info.plist
+ # "current version" in semantic format in Mach-O binary file
+ VERSION 16.4.0
+ # "compatibility version" in semantic format in Mach-O binary file
+ SOVERSION 1.0.0
PUBLIC_HEADER dynamicFramework.h
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
)
diff --git a/Help/prop_tgt/SOVERSION.rst b/Help/prop_tgt/SOVERSION.rst
index 672ff23..82b6b97 100644
--- a/Help/prop_tgt/SOVERSION.rst
+++ b/Help/prop_tgt/SOVERSION.rst
@@ -3,12 +3,25 @@ SOVERSION
What version number is this target.
-For shared libraries VERSION and SOVERSION can be used to specify the
-build version and API version respectively. When building or
+For shared libraries :prop_tgt:`VERSION` and ``SOVERSION`` can be used to
+specify the build version and API version respectively. When building or
installing appropriate symlinks are created if the platform supports
symlinks and the linker supports so-names. If only one of both is
specified the missing is assumed to have the same version number.
-SOVERSION is ignored if NO_SONAME property is set. For shared
-libraries and executables on Windows the VERSION attribute is parsed
-to extract a "major.minor" version number. These numbers are used as
-the image version of the binary.
+``SOVERSION`` is ignored if :prop_tgt:`NO_SONAME` property is set.
+
+Windows Versions
+^^^^^^^^^^^^^^^^
+
+For shared libraries and executables on Windows the :prop_tgt:`VERSION`
+attribute is parsed to extract a ``<major>.<minor>`` version number.
+These numbers are used as the image version of the binary.
+
+Mach-O Versions
+^^^^^^^^^^^^^^^
+
+For shared libraries and executables on Mach-O systems (e.g. OS X, iOS),
+the ``SOVERSION`` property corresponds to *compatibility version* and
+:prop_tgt:`VERSION` to *current version*. See the :prop_tgt:`FRAMEWORK` target
+property for an example. Versions of Mach-O binaries may be checked with the
+``otool -L <binary>`` command.
diff --git a/Help/prop_tgt/VERSION.rst b/Help/prop_tgt/VERSION.rst
index 87f6c49..66e7bde 100644
--- a/Help/prop_tgt/VERSION.rst
+++ b/Help/prop_tgt/VERSION.rst
@@ -3,14 +3,27 @@ VERSION
What version number is this target.
-For shared libraries VERSION and SOVERSION can be used to specify the
-build version and API version respectively. When building or
+For shared libraries ``VERSION`` and :prop_tgt:`SOVERSION` can be used
+to specify the build version and API version respectively. When building or
installing appropriate symlinks are created if the platform supports
symlinks and the linker supports so-names. If only one of both is
specified the missing is assumed to have the same version number. For
-executables VERSION can be used to specify the build version. When
+executables ``VERSION`` can be used to specify the build version. When
building or installing appropriate symlinks are created if the
-platform supports symlinks. For shared libraries and executables on
-Windows the VERSION attribute is parsed to extract a "major.minor"
-version number. These numbers are used as the image version of the
-binary.
+platform supports symlinks.
+
+Windows Versions
+^^^^^^^^^^^^^^^^
+
+For shared libraries and executables on Windows the ``VERSION``
+attribute is parsed to extract a ``<major>.<minor>`` version number.
+These numbers are used as the image version of the binary.
+
+Mach-O Versions
+^^^^^^^^^^^^^^^
+
+For shared libraries and executables on Mach-O systems (e.g. OS X, iOS),
+the :prop_tgt:`SOVERSION` property correspond to *compatibility version* and
+``VERSION`` to *current version*. See the :prop_tgt:`FRAMEWORK` target
+property for an example. Versions of Mach-O binaries may be checked with the
+``otool -L <binary>`` command.
diff --git a/Help/release/3.6.rst b/Help/release/3.6.rst
index 5c08b39..771c9dd 100644
--- a/Help/release/3.6.rst
+++ b/Help/release/3.6.rst
@@ -42,11 +42,6 @@ Commands
commands gained support for the ``%s`` placeholder. This is
the number of seconds since the UNIX Epoch.
-* The :command:`try_compile` command source file signature now honors
- configuration-specific flags (e.g. :variable:`CMAKE_<LANG>_FLAGS_DEBUG`)
- in the generated test project. Previously only the default such flags
- for the current toolchain were used.
-
Variables
---------
diff --git a/Help/release/dev/GenerateExportHeader-custom-content.rst b/Help/release/dev/GenerateExportHeader-custom-content.rst
new file mode 100644
index 0000000..161261c
--- /dev/null
+++ b/Help/release/dev/GenerateExportHeader-custom-content.rst
@@ -0,0 +1,6 @@
+GenerateExportHeader-custom-content
+-----------------------------------
+
+* The :module:`GenerateExportHeader` module learned a new
+ ``CUSTOM_CONTENT_FROM_VARIABLE`` option to specify a variable
+ containing custom content for inclusion in the generated header.
diff --git a/Help/release/dev/try_compile-config-flags.rst b/Help/release/dev/try_compile-config-flags.rst
new file mode 100644
index 0000000..ebfd6a4
--- /dev/null
+++ b/Help/release/dev/try_compile-config-flags.rst
@@ -0,0 +1,7 @@
+try_compile-config-flags
+------------------------
+
+* The :command:`try_compile` command source file signature now honors
+ configuration-specific flags (e.g. :variable:`CMAKE_<LANG>_FLAGS_DEBUG`)
+ in the generated test project. Previously only the default such flags
+ for the current toolchain were used. See policy :policy:`CMP0066`.
diff --git a/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst b/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst
index 582f9e4..36cf75f 100644
--- a/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst
+++ b/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst
@@ -15,6 +15,8 @@ warn by default:
policy :policy:`CMP0060`.
* ``CMAKE_POLICY_WARNING_CMP0065`` controls the warning for
policy :policy:`CMP0065`.
+* ``CMAKE_POLICY_WARNING_CMP0066`` controls the warning for
+ policy :policy:`CMP0066`.
This variable should not be set by a project in CMake code. Project
developers running CMake may set this variable in their cache to
diff --git a/Help/variable/CMAKE_TRY_COMPILE_PLATFORM_VARIABLES.rst b/Help/variable/CMAKE_TRY_COMPILE_PLATFORM_VARIABLES.rst
index 8e43465..0f96787 100644
--- a/Help/variable/CMAKE_TRY_COMPILE_PLATFORM_VARIABLES.rst
+++ b/Help/variable/CMAKE_TRY_COMPILE_PLATFORM_VARIABLES.rst
@@ -8,3 +8,19 @@ the host project.
This variable should not be set by project code. It is meant to be set by
CMake's platform information modules for the current toolchain, or by a
toolchain file when used with :variable:`CMAKE_TOOLCHAIN_FILE`.
+
+Variables meaningful to CMake, such as :variable:`CMAKE_<LANG>_FLAGS`, are
+propagated automatically. The ``CMAKE_TRY_COMPILE_PLATFORM_VARIABLES``
+variable may be set to pass custom variables meaningful to a toolchain file.
+For example, a toolchain file may contain:
+
+.. code-block:: cmake
+
+ set(CMAKE_SYSTEM_NAME ...)
+ set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES MY_CUSTOM_VARIABLE)
+ # ... use MY_CUSTOM_VARIABLE ...
+
+If a user passes ``-DMY_CUSTOM_VARIABLE=SomeValue`` to CMake then this
+setting will be made visible to the toolchain file both for the main
+project and for test projects generated by the :command:`try_compile`
+command source file signature.