-----BEGIN PGP SIGNATURE----- iQIcBAABCgAGBQJW5V6tAAoJEP4ixv2DE11FfXsQAJcANKTRAlhHfdPTZykxLZSe s6OehPbMC8Skq6QcvdWLYflJVXjgcqyxxIBKYqkVnYVsbHQ1glY44sjB7qvCoBwg VT0hHJP9dOR3xhj4e/F9dYVtXCsYEFvKTQ4o5zxVcEYrbYoRMRyxZKJ4zpVSpdPE 1jCmxWzYRLS7LqdLidYAEANHyw3X0N8UyKDUKtQTd1r4KBfFgYsqMJgqzqmlVOvV s/5XIxd2pkJ6dgBmXlz7yjhe2Vvd64orMeES8VtUqqTOX1Z4ejUzR2RNQRvkxu2j 8ljsZSntlRfcODFsO2LsC0Sz+1ZqRh8DzZKzootPN7bHPK5P/cyBSF8ZfjiIfTiw GyKc6Y5PPQqad+8wyfdqmMv2c2aDf0djgJ4BikewzrEj/P5bfOZPIAqtU3fpm1eR hp9ZdtXhnkHg8Kj04bngROlRfbpEDPp6b5JjLgAQxB4vEnPU9ES6BShAES8lSjx+ KyC/FjIIPd4ui8KHsJ+g28u76217leLohQFkn84XYIKdlW0+rpuWKs4Gmwi7hUi9 F6W1VJ62wl7l/xJBuZYW7PbbKUnt39VDS1h+JUBZ1PQ5tiWkmMReFe7yDItKwFQJ X/gwMQrHAzxJiu4fV84bvD+O6KbvoSLwkyszhzQ3J1Y2S5H94GU9Llf92uq8eU55 oG2i0lrrmX/X3l6LqJq5 =aMrL -----END PGP SIGNATURE----- Merge tag 'upstream/3.5.0' Upstream version 3.5.0 # gpg: Signature made So 13 Mär 2016 13:35:57 CET # gpg: using RSA key 0xFE22C6FD83135D45 # gpg: Good signature from "Felix Geyer <felix@fobos.de>" [ultimate] # gpg: aka "Felix Geyer <debfx-pkg@fobos.de>" [ultimate] # gpg: aka "Felix Geyer <debfx@kubuntu.org>" [ultimate] # gpg: aka "Felix Geyer <debfx@fobos.de>" [ultimate] # gpg: aka "Felix Geyer <debfx@ubuntu.com>" [ultimate] # gpg: aka "Felix Geyer <felix.geyer@fobos.de>" [ultimate] # gpg: aka "Felix Geyer <fgeyer@debian.org>" [ultimate] # Primary key fingerprint: 164C 7051 2F79 2947 6764 AB56 FE22 C6FD 8313 5D45ci/unstable
commit
daf8f217f9
@ -0,0 +1,85 @@
|
||||
cmake_parse_arguments
|
||||
---------------------
|
||||
|
||||
``cmake_parse_arguments`` is intended to be used in macros or functions for
|
||||
parsing the arguments given to that macro or function. It processes the
|
||||
arguments and defines a set of variables which hold the values of the
|
||||
respective options.
|
||||
|
||||
::
|
||||
|
||||
cmake_parse_arguments(<prefix> <options> <one_value_keywords>
|
||||
<multi_value_keywords> args...)
|
||||
|
||||
|
||||
The ``<options>`` argument contains all options for the respective macro,
|
||||
i.e. keywords which can be used when calling the macro without any value
|
||||
following, like e.g. the ``OPTIONAL`` keyword of the :command:`install`
|
||||
command.
|
||||
|
||||
The ``<one_value_keywords>`` argument contains all keywords for this macro
|
||||
which are followed by one value, like e.g. ``DESTINATION`` keyword of the
|
||||
:command:`install` command.
|
||||
|
||||
The ``<multi_value_keywords>`` argument contains all keywords for this
|
||||
macro which can be followed by more than one value, like e.g. the
|
||||
``TARGETS`` or ``FILES`` keywords of the :command:`install` command.
|
||||
|
||||
.. note::
|
||||
|
||||
All keywords shall be unique. I.e. every keyword shall only be specified
|
||||
once in either ``<options>``, ``<one_value_keywords>`` or
|
||||
``<multi_value_keywords>``. A warning will be emitted if uniqueness is
|
||||
violated.
|
||||
|
||||
When done, ``cmake_parse_arguments`` will have defined for each of the
|
||||
keywords listed in ``<options>``, ``<one_value_keywords>`` and
|
||||
``<multi_value_keywords>`` a variable composed of the given ``<prefix>``
|
||||
followed by ``"_"`` and the name of the respective keyword. These
|
||||
variables will then hold the respective value from the argument list.
|
||||
For the ``<options>`` keywords this will be ``TRUE`` or ``FALSE``.
|
||||
|
||||
All remaining arguments are collected in a variable
|
||||
``<prefix>_UNPARSED_ARGUMENTS``, this can be checked afterwards to see
|
||||
whether your macro was called with unrecognized parameters.
|
||||
|
||||
As an example here a ``my_install()`` macro, which takes similar arguments
|
||||
as the real :command:`install` command:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
function(MY_INSTALL)
|
||||
set(options OPTIONAL FAST)
|
||||
set(oneValueArgs DESTINATION RENAME)
|
||||
set(multiValueArgs TARGETS CONFIGURATIONS)
|
||||
cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}"
|
||||
"${multiValueArgs}" ${ARGN} )
|
||||
|
||||
# ...
|
||||
|
||||
Assume ``my_install()`` has been called like this:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
|
||||
|
||||
After the ``cmake_parse_arguments`` call the macro will have set the
|
||||
following variables::
|
||||
|
||||
MY_INSTALL_OPTIONAL = TRUE
|
||||
MY_INSTALL_FAST = FALSE (was not used in call to my_install)
|
||||
MY_INSTALL_DESTINATION = "bin"
|
||||
MY_INSTALL_RENAME = "" (was not used)
|
||||
MY_INSTALL_TARGETS = "foo;bar"
|
||||
MY_INSTALL_CONFIGURATIONS = "" (was not used)
|
||||
MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (nothing expected after "OPTIONAL")
|
||||
|
||||
You can then continue and process these variables.
|
||||
|
||||
Keywords terminate lists of values, e.g. if directly after a
|
||||
one_value_keyword another recognized keyword follows, this is
|
||||
interpreted as the beginning of the new option. E.g.
|
||||
``my_install(TARGETS foo DESTINATION OPTIONAL)`` would result in
|
||||
``MY_INSTALL_DESTINATION`` set to ``"OPTIONAL"``, but as ``OPTIONAL``
|
||||
is a keyword itself ``MY_INSTALL_DESTINATION`` will be empty and
|
||||
``MY_INSTALL_OPTIONAL`` will therefore be set to ``TRUE``.
|
@ -0,0 +1 @@
|
||||
.. cmake-module:: ../../Modules/FindXalanC.cmake
|
@ -1,18 +1,21 @@
|
||||
CMP0040
|
||||
-------
|
||||
|
||||
The target in the TARGET signature of add_custom_command() must exist.
|
||||
The target in the ``TARGET`` signature of :command:`add_custom_command`
|
||||
must exist and must be defined in current directory.
|
||||
|
||||
CMake 2.8.12 and lower silently ignored a custom command created with
|
||||
the TARGET signature of :command:`add_custom_command`
|
||||
if the target is unknown.
|
||||
the ``TARGET`` signature of :command:`add_custom_command`
|
||||
if the target is unknown or was defined outside the current directory.
|
||||
|
||||
The OLD behavior for this policy is to ignore custom commands
|
||||
for unknown targets. The NEW behavior for this policy is to report an error
|
||||
if the target referenced in :command:`add_custom_command` is unknown.
|
||||
The ``OLD`` behavior for this policy is to ignore custom commands
|
||||
for unknown targets. The ``NEW`` behavior for this policy is to report
|
||||
an error if the target referenced in :command:`add_custom_command` is
|
||||
unknown or was defined outside the current directory.
|
||||
|
||||
This policy was introduced in CMake version 3.0. CMake version
|
||||
|release| warns when the policy is not set and uses OLD behavior. Use
|
||||
the cmake_policy command to set it to OLD or NEW explicitly.
|
||||
|release| warns when the policy is not set and uses ``OLD`` behavior.
|
||||
Use the :command:`cmake_policy` command to set it to ``OLD`` or
|
||||
``NEW`` explicitly.
|
||||
|
||||
.. include:: DEPRECATED.txt
|
||||
|
@ -1,7 +1,6 @@
|
||||
CLEAN_NO_CUSTOM
|
||||
---------------
|
||||
|
||||
Should the output of custom commands be left.
|
||||
|
||||
If this is true then the outputs of custom commands for this directory
|
||||
will not be removed during the "make clean" stage.
|
||||
Set to true to tell :ref:`Makefile Generators` not to remove the outputs of
|
||||
custom commands for this directory during the ``make clean`` operation.
|
||||
This is ignored on other generators because it is not possible to implement.
|
||||
|
@ -1,19 +1,23 @@
|
||||
MACOSX_PACKAGE_LOCATION
|
||||
-----------------------
|
||||
|
||||
Place a source file inside a Mac OS X bundle, CFBundle, or framework.
|
||||
Place a source file inside a Application Bundle
|
||||
(:prop_tgt:`MACOSX_BUNDLE`), Core Foundation Bundle (:prop_tgt:`BUNDLE`),
|
||||
or Framework Bundle (:prop_tgt:`FRAMEWORK`). It is applicable for OS X
|
||||
and iOS.
|
||||
|
||||
Executable targets with the MACOSX_BUNDLE property set are built as
|
||||
Mac OS X application bundles on Apple platforms. Shared library
|
||||
targets with the FRAMEWORK property set are built as Mac OS X
|
||||
frameworks on Apple platforms. Module library targets with the BUNDLE
|
||||
property set are built as Mac OS X CFBundle bundles on Apple
|
||||
platforms. Source files listed in the target with this property set
|
||||
will be copied to a directory inside the bundle or framework content
|
||||
folder specified by the property value. For bundles the content
|
||||
folder is "<name>.app/Contents". For frameworks the content folder is
|
||||
"<name>.framework/Versions/<version>". For cfbundles the content
|
||||
folder is "<name>.bundle/Contents" (unless the extension is changed).
|
||||
See the PUBLIC_HEADER, PRIVATE_HEADER, and RESOURCE target properties
|
||||
for specifying files meant for Headers, PrivateHeaders, or Resources
|
||||
directories.
|
||||
Executable targets with the :prop_tgt:`MACOSX_BUNDLE` property set are
|
||||
built as OS X or iOS application bundles on Apple platforms. Shared
|
||||
library targets with the :prop_tgt:`FRAMEWORK` property set are built as
|
||||
OS X or iOS frameworks on Apple platforms. Module library targets with
|
||||
the :prop_tgt:`BUNDLE` property set are built as OS X ``CFBundle`` bundles
|
||||
on Apple platforms. Source files listed in the target with this property
|
||||
set will be copied to a directory inside the bundle or framework content
|
||||
folder specified by the property value. For OS X Application Bundles the
|
||||
content folder is ``<name>.app/Contents``. For OS X Frameworks the
|
||||
content folder is ``<name>.framework/Versions/<version>``. For OS X
|
||||
CFBundles the content folder is ``<name>.bundle/Contents`` (unless the
|
||||
extension is changed). See the :prop_tgt:`PUBLIC_HEADER`,
|
||||
:prop_tgt:`PRIVATE_HEADER`, and :prop_tgt:`RESOURCE` target properties for
|
||||
specifying files meant for ``Headers``, ``PrivateHeaders``, or
|
||||
``Resources`` directories.
|
||||
|
@ -1,9 +1,9 @@
|
||||
BUNDLE
|
||||
------
|
||||
|
||||
This target is a CFBundle on the Mac.
|
||||
This target is a ``CFBundle`` on the OS X.
|
||||
|
||||
If a module library target has this property set to true it will be
|
||||
built as a CFBundle when built on the mac. It will have the directory
|
||||
structure required for a CFBundle and will be suitable to be used for
|
||||
built as a ``CFBundle`` when built on the mac. It will have the directory
|
||||
structure required for a ``CFBundle`` and will be suitable to be used for
|
||||
creating Browser Plugins or other application resources.
|
||||
|
@ -1,7 +1,7 @@
|
||||
BUNDLE_EXTENSION
|
||||
----------------
|
||||
|
||||
The file extension used to name a BUNDLE target on the Mac.
|
||||
The file extension used to name a :prop_tgt:`BUNDLE` target on the OS X and iOS.
|
||||
|
||||
The default value is "bundle" - you can also use "plugin" or whatever
|
||||
The default value is ``bundle`` - you can also use ``plugin`` or whatever
|
||||
file extension is required by the host app for your bundle.
|
||||
|
@ -1,11 +1,31 @@
|
||||
FRAMEWORK
|
||||
---------
|
||||
|
||||
This target is a framework on the Mac.
|
||||
Build ``SHARED`` library as Framework Bundle on the OS X and iOS.
|
||||
|
||||
If a shared library target has this property set to true it will be
|
||||
built as a framework when built on the mac. It will have the
|
||||
If a ``SHARED`` library target has this property set to ``TRUE`` it will be
|
||||
built as a framework when built on the OS X and iOS. It will have the
|
||||
directory structure required for a framework and will be suitable to
|
||||
be used with the ``-framework`` option
|
||||
|
||||
See also the :prop_tgt:`FRAMEWORK_VERSION` target property.
|
||||
To customize ``Info.plist`` file in the framework, use
|
||||
:prop_tgt:`MACOSX_FRAMEWORK_INFO_PLIST` target property.
|
||||
|
||||
For OS X see also the :prop_tgt:`FRAMEWORK_VERSION` target property.
|
||||
|
||||
Example of creation ``dynamicFramework``:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
add_library(dynamicFramework SHARED
|
||||
dynamicFramework.c
|
||||
dynamicFramework.h
|
||||
)
|
||||
set_target_properties(dynamicFramework PROPERTIES
|
||||
FRAMEWORK TRUE
|
||||
FRAMEWORK_VERSION C
|
||||
MACOSX_FRAMEWORK_IDENTIFIER com.cmake.dynamicFramework
|
||||
MACOSX_FRAMEWORK_INFO_PLIST Info.plist
|
||||
PUBLIC_HEADER dynamicFramework.h
|
||||
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
|
||||
)
|
||||
|
@ -0,0 +1,11 @@
|
||||
IOS_INSTALL_COMBINED
|
||||
--------------------
|
||||
|
||||
Build a combined (device and simulator) target when installing.
|
||||
|
||||
When this property is set to set to false (which is the default) then it will
|
||||
either be built with the device SDK or the simulator SDK depending on the SDK
|
||||
set. But if this property is set to true then the target will at install time
|
||||
also be built for the corresponding SDK and combined into one library.
|
||||
|
||||
This feature requires at least Xcode version 6.
|
@ -1,12 +1,12 @@
|
||||
MACOSX_BUNDLE
|
||||
-------------
|
||||
|
||||
Build an executable as an application bundle on Mac OS X.
|
||||
Build an executable as an Application Bundle on OS X or iOS.
|
||||
|
||||
When this property is set to true the executable when built on Mac OS
|
||||
X will be created as an application bundle. This makes it a GUI
|
||||
executable that can be launched from the Finder. See the
|
||||
MACOSX_BUNDLE_INFO_PLIST target property for information about
|
||||
creation of the Info.plist file for the application bundle. This
|
||||
property is initialized by the value of the variable
|
||||
CMAKE_MACOSX_BUNDLE if it is set when a target is created.
|
||||
When this property is set to ``TRUE`` the executable when built on OS X
|
||||
or iOS will be created as an application bundle. This makes it
|
||||
a GUI executable that can be launched from the Finder. See the
|
||||
:prop_tgt:`MACOSX_FRAMEWORK_INFO_PLIST` target property for information about
|
||||
creation of the ``Info.plist`` file for the application bundle.
|
||||
This property is initialized by the value of the variable
|
||||
:variable:`CMAKE_MACOSX_BUNDLE` if it is set when a target is created.
|
||||
|
@ -1,18 +1,23 @@
|
||||
MACOSX_RPATH
|
||||
------------
|
||||
|
||||
Whether to use rpaths on Mac OS X.
|
||||
Whether this target on OS X or iOS is located at runtime using rpaths.
|
||||
|
||||
When this property is set to ``TRUE``, the directory portion of
|
||||
the ``install_name`` field of this shared library will be ``@rpath``
|
||||
unless overridden by :prop_tgt:`INSTALL_NAME_DIR`. This indicates
|
||||
the shared library is to be found at runtime using runtime
|
||||
paths (rpaths).
|
||||
|
||||
When this property is set to true, the directory portion of
|
||||
the "install_name" field of shared libraries will be ``@rpath``
|
||||
unless overridden by :prop_tgt:`INSTALL_NAME_DIR`. Runtime
|
||||
paths will also be embedded in binaries using this target and
|
||||
can be controlled by the :prop_tgt:`INSTALL_RPATH` target property.
|
||||
This property is initialized by the value of the variable
|
||||
:variable:`CMAKE_MACOSX_RPATH` if it is set when a target is
|
||||
created.
|
||||
|
||||
Policy CMP0042 was introduced to change the default value of
|
||||
MACOSX_RPATH to ON. This is because use of ``@rpath`` is a
|
||||
Runtime paths will also be embedded in binaries using this target and
|
||||
can be controlled by the :prop_tgt:`INSTALL_RPATH` target property on
|
||||
the target linking to this target.
|
||||
|
||||
Policy :policy:`CMP0042` was introduced to change the default value of
|
||||
``MACOSX_RPATH`` to ``TRUE``. This is because use of ``@rpath`` is a
|
||||
more flexible and powerful alternative to ``@executable_path`` and
|
||||
``@loader_path``.
|
||||
|
@ -1,7 +1,7 @@
|
||||
OSX_ARCHITECTURES_<CONFIG>
|
||||
--------------------------
|
||||
|
||||
Per-configuration OS X binary architectures for a target.
|
||||
Per-configuration OS X and iOS binary architectures for a target.
|
||||
|
||||
This property is the configuration-specific version of
|
||||
:prop_tgt:`OSX_ARCHITECTURES`.
|
||||
|
@ -1,11 +1,11 @@
|
||||
PRIVATE_HEADER
|
||||
--------------
|
||||
|
||||
Specify private header files in a FRAMEWORK shared library target.
|
||||
Specify private header files in a :prop_tgt:`FRAMEWORK` shared library target.
|
||||
|
||||
Shared library targets marked with the FRAMEWORK property generate
|
||||
frameworks on OS X and normal shared libraries on other platforms.
|
||||
Shared library targets marked with the :prop_tgt:`FRAMEWORK` property generate
|
||||
frameworks on OS X, iOS and normal shared libraries on other platforms.
|
||||
This property may be set to a list of header files to be placed in the
|
||||
PrivateHeaders directory inside the framework folder. On non-Apple
|
||||
platforms these headers may be installed using the PRIVATE_HEADER
|
||||
option to the install(TARGETS) command.
|
||||
platforms these headers may be installed using the ``PRIVATE_HEADER``
|
||||
option to the ``install(TARGETS)`` command.
|
||||
|
@ -1,11 +1,11 @@
|
||||
PUBLIC_HEADER
|
||||
-------------
|
||||
|
||||
Specify public header files in a FRAMEWORK shared library target.
|
||||
Specify public header files in a :prop_tgt:`FRAMEWORK` shared library target.
|
||||
|
||||
Shared library targets marked with the FRAMEWORK property generate
|
||||
frameworks on OS X and normal shared libraries on other platforms.
|
||||
Shared library targets marked with the :prop_tgt:`FRAMEWORK` property generate
|
||||
frameworks on OS X, iOS and normal shared libraries on other platforms.
|
||||
This property may be set to a list of header files to be placed in the
|
||||
Headers directory inside the framework folder. On non-Apple platforms
|
||||
these headers may be installed using the PUBLIC_HEADER option to the
|
||||
install(TARGETS) command.
|
||||
``Headers`` directory inside the framework folder. On non-Apple platforms
|
||||
these headers may be installed using the ``PUBLIC_HEADER`` option to the
|
||||
``install(TARGETS)`` command.
|
||||
|
@ -1,11 +1,61 @@
|
||||
RESOURCE
|
||||
--------
|
||||
|
||||
Specify resource files in a FRAMEWORK shared library target.
|
||||
|
||||
Shared library targets marked with the FRAMEWORK property generate
|
||||
frameworks on OS X and normal shared libraries on other platforms.
|
||||
This property may be set to a list of files to be placed in the
|
||||
Resources directory inside the framework folder. On non-Apple
|
||||
platforms these files may be installed using the RESOURCE option to
|
||||
the install(TARGETS) command.
|
||||
Specify resource files in a :prop_tgt:`FRAMEWORK` or :prop_tgt:`BUNDLE`.
|
||||
|
||||
Target marked with the :prop_tgt:`FRAMEWORK` or :prop_tgt:`BUNDLE` property
|
||||
generate framework or application bundle (both OS X and iOS is supported)
|
||||
or normal shared libraries on other platforms.
|
||||
This property may be set to a list of files to be placed in the corresponding
|
||||
directory (eg. ``Resources`` directory for OS X) inside the bundle.
|
||||
On non-Apple platforms these files may be installed using the ``RESOURCE``
|
||||
option to the ``install(TARGETS)`` command.
|
||||
|
||||
Following example of Application Bundle:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
add_executable(ExecutableTarget
|
||||
addDemo.c
|
||||
resourcefile.txt
|
||||
appresourcedir/appres.txt
|
||||
)
|
||||
|
||||
target_link_libraries(ExecutableTarget heymath mul)
|
||||
|
||||
set(RESOURCE_FILES
|
||||
resourcefile.txt
|
||||
appresourcedir/appres.txt
|
||||
)
|
||||
|
||||
set_target_properties(ExecutableTarget PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_FRAMEWORK_IDENTIFIER org.cmake.ExecutableTarget
|
||||
RESOURCE "${RESOURCE_FILES}"
|
||||
)
|
||||
|
||||
will produce flat structure for iOS systems::
|
||||
|
||||
ExecutableTarget.app
|
||||
appres.txt
|
||||
ExecutableTarget
|
||||
Info.plist
|
||||
resourcefile.txt
|
||||
|
||||
For OS X systems it will produce following directory structure::
|
||||
|
||||
ExecutableTarget.app/
|
||||
Contents
|
||||
Info.plist
|
||||
MacOS
|
||||
ExecutableTarget
|
||||
Resources
|
||||
appres.txt
|
||||
resourcefile.txt
|
||||
|
||||
For Linux, such cmake script produce following files::
|
||||
|
||||
ExecutableTarget
|
||||
Resources
|
||||
appres.txt
|
||||
resourcefile.txt
|
||||
|
@ -0,0 +1,185 @@
|
||||
CMake 3.5 Release Notes
|
||||
***********************
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. contents::
|
||||
|
||||
Changes made since CMake 3.4 include the following.
|
||||
|
||||
New Features
|
||||
============
|
||||
|
||||
GUI
|
||||
---
|
||||
|
||||
* The :manual:`cmake-gui(1)` gained options to control warnings about
|
||||
deprecated functionality.
|
||||
|
||||
* The :manual:`cmake-gui(1)` learned an option to set the toolset
|
||||
to be used with VS IDE and Xcode generators, much like the
|
||||
existing ``-T`` option to :manual:`cmake(1)`.
|
||||
|
||||
* The :manual:`cmake-gui(1)` gained a Regular Expression Explorer which
|
||||
may be used to create and evaluate regular expressions in real-time.
|
||||
The explorer window is available via the ``Tools`` menu.
|
||||
|
||||
Command-Line
|
||||
------------
|
||||
|
||||
* The ``-Wdev`` and ``-Wno-dev`` :manual:`cmake(1)` options now also enable
|
||||
and suppress the deprecated warnings output by default.
|
||||
|
||||
* The suppression of developer warnings as errors can now be controlled with
|
||||
the new ``-Werror=dev`` and ``-Wno-error=dev`` :manual:`cmake(1)` options.
|
||||
|
||||
* The :manual:`cmake(1)` ``-E`` command-line tools ``copy``,
|
||||
``copy_if_different``, ``copy_directory``, and ``make_directory``
|
||||
learned to support multiple input files or directories.
|
||||
|
||||
Commands
|
||||
--------
|
||||
|
||||
* The :command:`cmake_parse_arguments` command is now implemented natively.
|
||||
The :module:`CMakeParseArguments` module remains as an empty placeholder
|
||||
for compatibility.
|
||||
|
||||
* The :command:`install(DIRECTORY)` command learned to support
|
||||
:manual:`generator expressions <cmake-generator-expressions(7)>`
|
||||
in the list of directories.
|
||||
|
||||
Variables
|
||||
---------
|
||||
|
||||
* The :variable:`CMAKE_ERROR_DEPRECATED` variable can now be set using the
|
||||
``-Werror=deprecated`` and ``-Wno-error=deprecated`` :manual:`cmake(1)`
|
||||
options.
|
||||
|
||||
* The :variable:`CMAKE_WARN_DEPRECATED` variable can now be set using the
|
||||
``-Wdeprecated`` and ``-Wno-deprecated`` :manual:`cmake(1)` options.
|
||||
|
||||
Properties
|
||||
----------
|
||||
|
||||
* The :prop_tgt:`VS_GLOBAL_<variable>` target property is now implemented
|
||||
for VS 2010 and above. Previously it worked only in VS 2008 and below.
|
||||
|
||||
Modules
|
||||
-------
|
||||
|
||||
* The :module:`ExternalProject` module learned a new ``GIT_REMOTE_NAME``
|
||||
option to control the ``git clone --origin`` value.
|
||||
|
||||
* The :module:`FindBoost` module now provides imported targets
|
||||
such as ``Boost::boost`` and ``Boost::filesystem``.
|
||||
|
||||
* The :module:`FindFLEX` module ``FLEX_TARGET`` macro learned a
|
||||
new ``DEFINES_FILE`` option to specify a custom output header
|
||||
to be generated.
|
||||
|
||||
* The :module:`FindGTest` module now provides imported targets.
|
||||
|
||||
* The :module:`FindGTK2` module, when ``GTK2_USE_IMPORTED_TARGETS`` is
|
||||
enabled, now sets ``GTK2_LIBRARIES`` to contain the list of imported
|
||||
targets instead of the paths to the libraries. Moreover it now sets
|
||||
a new ``GTK2_TARGETS`` variable containing all the targets imported.
|
||||
|
||||
* The :module:`FindOpenMP` module learned to support Clang.
|
||||
|
||||
* The :module:`FindOpenSSL` module gained a new
|
||||
``OPENSSL_MSVC_STATIC_RT`` option to search for libraries using
|
||||
the MSVC static runtime.
|
||||
|
||||
* The :module:`FindPNG` module now provides imported targets.
|
||||
|
||||
* The :module:`FindTIFF` module now provides imported targets.
|
||||
|
||||
* A :module:`FindXalanC` module was introduced to find the
|
||||
Apache Xalan-C++ XSL transform processing library.
|
||||
|
||||
* The :module:`FindXercesC` module now provides imported targets.
|
||||
|
||||
Platforms
|
||||
---------
|
||||
|
||||
* Support was added for the ARM Compiler (arm.com) with compiler id ``ARMCC``.
|
||||
|
||||
* A new platform file for cross-compiling in the Cray Linux Environment to
|
||||
target compute nodes was added. See
|
||||
:ref:`Cross Compiling for the Cray Linux Environment <Cray Cross-Compile>`
|
||||
for usage details.
|
||||
|
||||
* The :manual:`Compile Features <cmake-compile-features(7)>` functionality
|
||||
is now aware of features supported by Clang compilers on Windows (MinGW).
|
||||
|
||||
* When building for embedded Apple platforms like iOS CMake learned to build and
|
||||
install combined targets which contain both a device and a simulator build.
|
||||
This behavior can be enabled by setting the :prop_tgt:`IOS_INSTALL_COMBINED`
|
||||
target property.
|
||||
|
||||
CPack
|
||||
-----
|
||||
|
||||
* The :module:`CPackDMG` module learned new variable to specify AppleScript
|
||||
file run to customize appearance of ``DragNDrop`` installer folder,
|
||||
including background image setting using supplied PNG or multi-resolution
|
||||
TIFF file. See the :variable:`CPACK_DMG_DS_STORE_SETUP_SCRIPT` and
|
||||
:variable:`CPACK_DMG_BACKGROUND_IMAGE` variables.
|
||||
|
||||
* The :module:`CPackDeb` module learned to set the optional config
|
||||
file ``Source`` field using a monolithic or per-component variable.
|
||||
See :variable:`CPACK_DEBIAN_PACKAGE_SOURCE`.
|
||||
|
||||
* The :module:`CPackDeb` module learned to set Package, Section
|
||||
and Priority control fields per-component.
|
||||
See variables :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_SECTION` and
|
||||
:variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_PRIORITY`.
|
||||
|
||||
* The :module:`CPack DragNDrop generator <CPackDMG>` learned to add
|
||||
multi-lingual SLAs to a DMG which is presented to the user when they try to
|
||||
mount the DMG. See the :variable:`CPACK_DMG_SLA_LANGUAGES` and
|
||||
:variable:`CPACK_DMG_SLA_DIR` variables for details.
|
||||
|
||||
* The :module:`CPackNSIS` module learned new variables to add bitmaps to the
|
||||
installer. See the :variable:`CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP`
|
||||
and :variable:`CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP` variables.
|
||||
|
||||
* The :module:`CPackRPM` module learned to set Name and Group
|
||||
control fields per-component.
|
||||
See :variable:`CPACK_RPM_<component>_PACKAGE_NAME`
|
||||
and :variable:`CPACK_RPM_<component>_PACKAGE_GROUP`.
|
||||
|
||||
Other
|
||||
-----
|
||||
|
||||
* Warnings about deprecated functionality are now enabled by default.
|
||||
They may be suppressed with ``-Wno-deprecated`` or by setting the
|
||||
:variable:`CMAKE_WARN_DEPRECATED` variable to false.
|
||||
|
||||
Deprecated and Removed Features
|
||||
===============================
|
||||
|
||||
* The :manual:`cmake(1)` ``-E time`` command now properly passes arguments
|
||||
with spaces or special characters through to the child process. This
|
||||
may break scripts that worked around the bug with their own extra
|
||||
quoting or escaping.
|
||||
|
||||
* The :generator:`Xcode` generator was fixed to escape backslashes in
|
||||
strings consistently with other generators. Projects that previously
|
||||
worked around the inconsistecy with an extra level of backslashes
|
||||
conditioned on the Xcode generator must be updated to remove the
|
||||
workaround for CMake 3.5 and greater.
|
||||
|
||||
Other Changes
|
||||
=============
|
||||
|
||||
* The :generator:`Visual Studio 14 2015` generator learned to map the
|
||||
``/debug:fastlink`` linker flag to the ``.vcxproj`` file property.
|
||||
|
||||
* The :module:`FindGTK2` module now configures the ``GTK2::sigc++`` imported
|
||||
target to enable c++11 on its dependents when using sigc++ 2.5.1 or higher.
|
||||
|
||||
* The precompiled Windows binary provided on ``cmake.org`` is now a
|
||||
``.msi`` package instead of an installer executable. One may need
|
||||
to manually uninstall CMake versions lower than 3.5 before installing
|
||||
the new package.
|
@ -1,6 +1,6 @@
|
||||
APPLE
|
||||
-----
|
||||
|
||||
``True`` if running on Mac OS X.
|
||||
``True`` if running on OS X.
|
||||
|
||||
Set to ``true`` on Mac OS X.
|
||||
Set to ``true`` on OS X.
|
||||
|
@ -1,8 +1,7 @@
|
||||
CMAKE_ERROR_DEPRECATED
|
||||
----------------------
|
||||
|
||||
Whether to issue deprecation errors for macros and functions.
|
||||
Whether to issue errors for deprecated functionality.
|
||||
|
||||
If ``TRUE``, this can be used by macros and functions to issue fatal
|
||||
errors when deprecated macros or functions are used. This variable is
|
||||
``FALSE`` by default.
|
||||
If ``TRUE``, use of deprecated functionality will issue fatal errors.
|
||||
If this variable is not set, CMake behaves as if it were set to ``FALSE``.
|
||||
|
@ -0,0 +1,30 @@
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS
|
||||
-----------------------------
|
||||
|
||||
Enable/Disable output of compile commands during generation.
|
||||
|
||||
If enabled, generates a ``compile_commands.json`` file containing the exact
|
||||
compiler calls for all translation units of the project in machine-readable
|
||||
form. The format of the JSON file looks like:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
[
|
||||
{
|
||||
"directory": "/home/user/development/project",
|
||||
"command": "/usr/bin/c++ ... -c ../foo/foo.cc",
|
||||
"file": "../foo/foo.cc"
|
||||
},
|
||||
|
||||
...
|
||||
|
||||
{
|
||||
"directory": "/home/user/development/project",
|
||||
"command": "/usr/bin/c++ ... -c ../foo/bar.cc",
|
||||
"file": "../foo/bar.cc"
|
||||
}
|
||||
]
|
||||
|
||||
.. note::
|
||||
This option is implemented only by :ref:`Makefile Generators`
|
||||
and the :generator:`Ninja`. It is ignored on other generators.
|
@ -0,0 +1,8 @@
|
||||
CMAKE_IOS_INSTALL_COMBINED
|
||||
--------------------------
|
||||
|
||||
Default value for :prop_tgt:`IOS_INSTALL_COMBINED` of targets.
|
||||
|
||||
This variable is used to initialize the :prop_tgt:`IOS_INSTALL_COMBINED`
|
||||
property on all the targets. See that target property for additional
|
||||
information.
|
@ -1,7 +1,7 @@
|
||||
CMAKE_MACOSX_RPATH
|
||||
-------------------
|
||||
|
||||
Whether to use rpaths on Mac OS X.
|
||||
Whether to use rpaths on OS X and iOS.
|
||||
|
||||
This variable is used to initialize the :prop_tgt:`MACOSX_RPATH` property on
|
||||
all targets.
|
||||
|
@ -1,7 +1,10 @@
|
||||
CMAKE_WARN_DEPRECATED
|
||||
---------------------
|
||||
|
||||
Whether to issue deprecation warnings for macros and functions.
|
||||
Whether to issue warnings for deprecated functionality.
|
||||
|
||||
If ``TRUE``, this can be used by macros and functions to issue deprecation
|
||||
warnings. This variable is ``FALSE`` by default.
|
||||
If not ``FALSE``, use of deprecated functionality will issue warnings.
|
||||
If this variable is not set, CMake behaves as if it were set to ``TRUE``.
|
||||
|
||||
When running :manual:`cmake(1)`, this option can be enabled with the
|
||||
``-Wdeprecated`` option, or disabled with the ``-Wno-deprecated`` option.
|
||||
|
@ -0,0 +1,297 @@
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2014-2015 Ruslan Baratov, Gregor Jasny
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# Function to print messages of this module
|
||||
function(_ios_install_combined_message)
|
||||
message("[iOS combined] " ${ARGN})
|
||||
endfunction()
|
||||
|
||||
# Get build settings for the current target/config/SDK by running
|
||||
# `xcodebuild -sdk ... -showBuildSettings` and parsing it's output
|
||||
function(_ios_install_combined_get_build_setting sdk variable resultvar)
|
||||
if("${sdk}" STREQUAL "")
|
||||
message(FATAL_ERROR "`sdk` is empty")
|
||||
endif()
|
||||
|
||||
if("${variable}" STREQUAL "")
|
||||
message(FATAL_ERROR "`variable` is empty")
|
||||
endif()
|
||||
|
||||
if("${resultvar}" STREQUAL "")
|
||||
message(FATAL_ERROR "`resultvar` is empty")
|
||||
endif()
|
||||
|
||||
set(
|
||||
cmd
|
||||
xcodebuild -showBuildSettings
|
||||
-sdk "${sdk}"
|
||||
-target "${CURRENT_TARGET}"
|
||||
-config "${CURRENT_CONFIG}"
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${cmd}
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
||||
RESULT_VARIABLE result
|
||||
OUTPUT_VARIABLE output
|
||||
)
|
||||
|
||||
if(NOT result EQUAL 0)
|
||||
message(FATAL_ERROR "Command failed (${result}): ${cmd}")
|
||||
endif()
|
||||
|
||||
if(NOT output MATCHES " ${variable} = ([^\n]*)")
|
||||
message(FATAL_ERROR "${variable} not found.")
|
||||
endif()
|
||||
|
||||
set("${resultvar}" "${CMAKE_MATCH_1}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Get architectures of given SDK (iphonesimulator/iphoneos)
|
||||
function(_ios_install_combined_get_valid_archs sdk resultvar)
|
||||
cmake_policy(SET CMP0007 NEW)
|
||||
|
||||
if("${resultvar}" STREQUAL "")
|
||||
message(FATAL_ERROR "`resultvar` is empty")
|
||||
endif()
|
||||
|
||||
_ios_install_combined_get_build_setting("${sdk}" "VALID_ARCHS" valid_archs)
|
||||
|
||||
separate_arguments(valid_archs)
|
||||
list(REMOVE_ITEM valid_archs "") # remove empty elements
|
||||
list(REMOVE_DUPLICATES valid_archs)
|
||||
|
||||
set("${resultvar}" "${valid_archs}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Final target can contain more architectures that specified by SDK. This
|
||||
# function will run 'lipo -info' and parse output. Result will be returned
|
||||
# as a CMake list.
|
||||
function(_ios_install_combined_get_real_archs filename resultvar)
|
||||
set(cmd "${_lipo_path}" -info "${filename}")
|
||||
execute_process(
|
||||
COMMAND ${cmd}
|
||||
RESULT_VARIABLE result
|
||||
OUTPUT_VARIABLE output
|
||||
ERROR_VARIABLE output
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT result EQUAL 0)
|
||||
message(
|
||||
FATAL_ERROR "Command failed (${result}): ${cmd}\n\nOutput:\n${output}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT output MATCHES "(Architectures in the fat file: [^\n]+ are|Non-fat file: [^\n]+ is architecture): ([^\n]*)")
|
||||
message(FATAL_ERROR "Could not detect architecture from: ${output}")
|
||||
endif()
|
||||
|
||||
separate_arguments(CMAKE_MATCH_2)
|
||||
set(${resultvar} ${CMAKE_MATCH_2} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Run build command for the given SDK
|
||||
function(_ios_install_combined_build sdk)
|
||||
if("${sdk}" STREQUAL "")
|
||||
message(FATAL_ERROR "`sdk` is empty")
|
||||
endif()
|
||||
|
||||
_ios_install_combined_message("Build `${CURRENT_TARGET}` for `${sdk}`")
|
||||
|
||||
execute_process(
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}"
|
||||
--build
|
||||
.
|
||||
--target "${CURRENT_TARGET}"
|
||||
--config ${CURRENT_CONFIG}
|
||||
--
|
||||
-sdk "${sdk}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
||||
RESULT_VARIABLE result
|
||||
)
|
||||
|
||||
if(NOT result EQUAL 0)
|
||||
message(FATAL_ERROR "Build failed")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Remove given architecture from file. This step needed only in rare cases
|
||||
# when target was built in "unusual" way. Emit warning message.
|
||||
function(_ios_install_combined_remove_arch lib arch)
|
||||
_ios_install_combined_message(
|
||||
"Warning! Unexpected architecture `${arch}` detected and will be removed "
|
||||
"from file `${lib}`")
|
||||
set(cmd "${_lipo_path}" -remove ${arch} -output ${lib} ${lib})
|
||||
execute_process(
|
||||
COMMAND ${cmd}
|
||||
RESULT_VARIABLE result
|
||||
OUTPUT_VARIABLE output
|
||||
ERROR_VARIABLE output
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT result EQUAL 0)
|
||||
message(
|
||||
FATAL_ERROR "Command failed (${result}): ${cmd}\n\nOutput:\n${output}"
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Check that 'lib' contains only 'archs' architectures (remove others).
|
||||
function(_ios_install_combined_keep_archs lib archs)
|
||||
_ios_install_combined_get_real_archs("${lib}" real_archs)
|
||||
set(archs_to_remove ${real_archs})
|
||||
list(REMOVE_ITEM archs_to_remove ${archs})
|
||||
foreach(x ${archs_to_remove})
|
||||
_ios_install_combined_remove_arch("${lib}" "${x}")
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(_ios_install_combined_detect_sdks this_sdk_var corr_sdk_var)
|
||||
cmake_policy(SET CMP0057 NEW)
|
||||
|
||||
set(this_sdk "$ENV{PLATFORM_NAME}")
|
||||
if("${this_sdk}" STREQUAL "")
|
||||
message(FATAL_ERROR "Environment variable PLATFORM_NAME is empty")
|
||||
endif()
|
||||
|
||||
set(all_platforms "$ENV{SUPPORTED_PLATFORMS}")
|
||||
if("${all_platforms}" STREQUAL "")
|
||||
message(FATAL_ERROR "Environment variable SUPPORTED_PLATFORMS is empty")
|
||||
endif()
|
||||
|
||||
separate_arguments(all_platforms)
|
||||
if(NOT this_sdk IN_LIST all_platforms)
|
||||
message(FATAL_ERROR "`${this_sdk}` not found in `${all_platforms}`")
|
||||
endif()
|
||||
|
||||
list(REMOVE_ITEM all_platforms "" "${this_sdk}")
|
||||
list(LENGTH all_platforms all_platforms_length)
|
||||
if(NOT all_platforms_length EQUAL 1)
|
||||
message(FATAL_ERROR "Expected one element: ${all_platforms}")
|
||||
endif()
|
||||
|
||||
set(${this_sdk_var} "${this_sdk}" PARENT_SCOPE)
|
||||
set(${corr_sdk_var} "${all_platforms}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Create combined binary for the given target.
|
||||
#
|
||||
# Preconditions:
|
||||
# * Target already installed at ${destination}
|
||||
# for the ${PLATFORM_NAME} platform
|
||||
#
|
||||
# This function will:
|
||||
# * Run build for the lacking platform, i.e. opposite to the ${PLATFORM_NAME}
|
||||
# * Fuse both libraries by running lipo
|
||||
function(ios_install_combined target destination)
|
||||
if("${target}" STREQUAL "")
|
||||
message(FATAL_ERROR "`target` is empty")
|
||||
endif()
|
||||
|
||||
if("${destination}" STREQUAL "")
|
||||
message(FATAL_ERROR "`destination` is empty")
|
||||
endif()
|
||||
|
||||
if(NOT IS_ABSOLUTE "${destination}")
|
||||
message(FATAL_ERROR "`destination` is not absolute: ${destination}")
|
||||
endif()
|
||||
|
||||
if(IS_DIRECTORY "${destination}" OR IS_SYMLINK "${destination}")
|
||||
message(FATAL_ERROR "`destination` is no regular file: ${destination}")
|
||||
endif()
|
||||
|
||||
if("${CMAKE_BINARY_DIR}" STREQUAL "")
|
||||
message(FATAL_ERROR "`CMAKE_BINARY_DIR` is empty")
|
||||
endif()
|
||||
|
||||
if(NOT IS_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
message(FATAL_ERROR "Is not a directory: ${CMAKE_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
if("${CMAKE_INSTALL_CONFIG_NAME}" STREQUAL "")
|
||||
message(FATAL_ERROR "CMAKE_INSTALL_CONFIG_NAME is empty")
|
||||
endif()
|
||||
|
||||
set(cmd xcrun -f lipo)
|
||||
execute_process(
|
||||
COMMAND ${cmd}
|
||||
RESULT_VARIABLE result
|
||||
OUTPUT_VARIABLE output
|
||||
ERROR_VARIABLE output
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT result EQUAL 0)
|
||||
message(
|
||||
FATAL_ERROR "Command failed (${result}): ${cmd}\n\nOutput:\n${output}"
|
||||
)
|
||||
endif()
|
||||
set(_lipo_path ${output})
|
||||
|
||||
set(CURRENT_CONFIG "${CMAKE_INSTALL_CONFIG_NAME}")
|
||||
set(CURRENT_TARGET "${target}")
|
||||
|
||||
_ios_install_combined_message("Target: ${CURRENT_TARGET}")
|
||||
_ios_install_combined_message("Config: ${CURRENT_CONFIG}")
|
||||
_ios_install_combined_message("Destination: ${destination}")
|
||||
|
||||
# Get SDKs
|
||||
_ios_install_combined_detect_sdks(this_sdk corr_sdk)
|
||||
|
||||
# Get architectures of the target
|
||||
_ios_install_combined_get_valid_archs("${corr_sdk}" corr_valid_archs)
|
||||
_ios_install_combined_get_valid_archs("${this_sdk}" this_valid_archs)
|
||||
|
||||
# Return if there are no valid architectures for the SDK.
|
||||
# (note that library already installed)
|
||||
if("${corr_valid_archs}" STREQUAL "")
|
||||
_ios_install_combined_message(
|
||||
"No architectures detected for `${corr_sdk}` (skip)"
|
||||
)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Trigger build of corresponding target
|
||||
_ios_install_combined_build("${corr_sdk}")
|
||||
|
||||
# Get location of the library in build directory
|
||||
_ios_install_combined_get_build_setting(
|
||||
"${corr_sdk}" "CONFIGURATION_BUILD_DIR" corr_build_dir)
|
||||
_ios_install_combined_get_build_setting(
|
||||
"${corr_sdk}" "EXECUTABLE_PATH" corr_executable_path)
|
||||
set(corr "${corr_build_dir}/${corr_executable_path}")
|
||||
|
||||
_ios_install_combined_keep_archs("${corr}" "${corr_valid_archs}")
|
||||
_ios_install_combined_keep_archs("${destination}" "${this_valid_archs}")
|
||||
|
||||
_ios_install_combined_message("Current: ${destination}")
|
||||
_ios_install_combined_message("Corresponding: ${corr}")
|
||||
|
||||
set(cmd "${_lipo_path}" -create ${corr} ${destination} -output ${destination})
|
||||
|
||||
execute_process(
|
||||
COMMAND ${cmd}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
RESULT_VARIABLE result
|
||||
)
|
||||
|
||||
if(NOT result EQUAL 0)
|
||||
message(FATAL_ERROR "Command failed: ${cmd}")
|
||||
endif()
|
||||
|
||||
_ios_install_combined_message("Install done: ${destination}")
|
||||
endfunction()
|
@ -0,0 +1,37 @@
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2015 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# This file contains common code blocks used by all the language information
|
||||
# files
|
||||
|
||||
# load any compiler-wrapper specific information
|
||||
macro(__cmake_include_compiler_wrapper lang)
|
||||
set(_INCLUDED_WRAPPER_FILE 0)
|
||||
if (CMAKE_${lang}_COMPILER_ID)
|
||||
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE)
|
||||
endif()
|
||||
if (NOT _INCLUDED_WRAPPER_FILE)
|
||||
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE)
|
||||
endif ()
|
||||
|
||||
# No platform - wrapper - lang information so maybe there's just wrapper - lang information
|
||||
if(NOT _INCLUDED_WRAPPER_FILE)
|
||||
if (CMAKE_${lang}_COMPILER_ID)
|
||||
include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE)
|
||||
endif()
|
||||
if (NOT _INCLUDED_WRAPPER_FILE)
|
||||
include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE)
|
||||
endif ()
|
||||
endif ()
|
||||
endmacro ()
|
@ -0,0 +1,7 @@
|
||||
include(Compiler/ARMCC)
|
||||
|
||||
set(CMAKE_ASM_OUTPUT_EXTENSION ".o")
|
||||
set(CMAKE_ASM_OUTPUT_EXTENSION_REPLACE 1)
|
||||
|
||||
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>")
|
||||
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa)
|
@ -0,0 +1,2 @@
|
||||
include(Compiler/ARMCC)
|
||||
__compiler_armcc(C)
|
@ -0,0 +1,2 @@
|
||||
include(Compiler/ARMCC)
|
||||
__compiler_armcc(CXX)
|
@ -0,0 +1,16 @@
|
||||
# ARMCC Toolchain
|
||||
set(_compiler_id_pp_test "defined(__ARMCC_VERSION)")
|
||||
|
||||
set(_compiler_id_version_compute "
|
||||
#if __ARMCC_VERSION >= 1000000
|
||||
/* __ARMCC_VERSION = VRRPPPP */
|
||||
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__ARMCC_VERSION/1000000)
|
||||
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__ARMCC_VERSION/10000 % 100)
|
||||
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__ARMCC_VERSION % 10000)
|
||||
#else
|
||||
/* __ARMCC_VERSION = VRPPPP */
|
||||
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__ARMCC_VERSION/100000)
|
||||
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__ARMCC_VERSION/10000 % 10)
|
||||
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__ARMCC_VERSION % 10000)
|
||||
#endif
|
||||
")
|
@ -0,0 +1,36 @@
|
||||
if(_ARMCC_CMAKE_LOADED)
|
||||
return()
|
||||
endif()
|
||||
set(_ARMCC_CMAKE_LOADED TRUE)
|
||||
|
||||
# See ARM Compiler documentation at:
|
||||
# http://infocenter.arm.com/help/topic/com.arm.doc.set.swdev/index.html
|
||||
|
||||
get_filename_component(_CMAKE_C_TOOLCHAIN_LOCATION "${CMAKE_C_COMPILER}" PATH)
|
||||
get_filename_component(_CMAKE_CXX_TOOLCHAIN_LOCATION "${CMAKE_CXX_COMPILER}" PATH)
|
||||
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ".elf")
|
||||
|
||||
find_program(CMAKE_ARMCC_LINKER armlink HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" )
|
||||
find_program(CMAKE_ARMCC_AR armar HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" )
|
||||
|
||||
set(CMAKE_LINKER "${CMAKE_ARMCC_LINKER}" CACHE FILEPATH "The ARMCC linker" FORCE)
|
||||
mark_as_advanced(CMAKE_ARMCC_LINKER)
|
||||
set(CMAKE_AR "${CMAKE_ARMCC_AR}" CACHE FILEPATH "The ARMCC archiver" FORCE)
|
||||
mark_as_advanced(CMAKE_ARMCC_AR)
|
||||
|
||||
macro(__compiler_armcc lang)
|
||||
set(CMAKE_${lang}_FLAGS_INIT "")
|
||||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Ospace -DNDEBUG")
|
||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-Otime -DNDEBUG")
|
||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
|
||||
set(CMAKE_${lang}_OUTPUT_EXTENSION ".o")
|
||||
set(CMAKE_${lang}_OUTPUT_EXTENSION_REPLACE 1)
|
||||
|
||||
set(CMAKE_${lang}_LINK_EXECUTABLE "<CMAKE_LINKER> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> <OBJECTS> -o <TARGET> --list <TARGET_BASE>.map")
|
||||
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "<CMAKE_AR> --create -cr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
|
||||
set(CMAKE_DEPFILE_FLAGS_${lang} "--depend=<DEPFILE> --depend_single_line --no_depend_system_headers")
|
||||
endmacro()
|
@ -0,0 +1,11 @@
|
||||
if(__craylinux_crayprgenv_c)
|
||||
return()
|
||||
endif()
|
||||
set(__craylinux_crayprgenv_c 1)
|
||||
|
||||
include(Compiler/CrayPrgEnv)
|
||||
macro(__CrayPrgEnv_setup_C compiler_cmd link_cmd)
|
||||
__CrayPrgEnv_setup(C
|
||||
${CMAKE_ROOT}/Modules/CMakeCCompilerABI.c
|
||||
${compiler_cmd} ${link_cmd})
|
||||
endmacro()
|
@ -0,0 +1,11 @@
|
||||
if(__craylinux_crayprgenv_cxx)
|
||||
return()
|
||||
endif()
|
||||
set(__craylinux_crayprgenv_cxx 1)
|
||||
|
||||
include(Compiler/CrayPrgEnv)
|
||||
macro(__CrayPrgEnv_setup_CXX compiler_cmd link_cmd)
|
||||
__CrayPrgEnv_setup(CXX
|
||||
${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp
|
||||
${compiler_cmd} ${link_cmd})
|
||||
endmacro()
|
@ -0,0 +1,7 @@
|
||||
if(__craylinux_crayprgenv_cray_c)
|
||||
return()
|
||||
endif()
|
||||
set(__craylinux_crayprgenv_cray_c 1)
|
||||
|
||||
include(Compiler/CrayPrgEnv-C)
|
||||
__CrayPrgEnv_setup_C("/opt/cray/cce/.*/ccfe" "/opt/cray/cce/.*/ld")
|
@ -0,0 +1,7 @@
|
||||
if(__craylinux_crayprgenv_cray_cxx)
|
||||
return()
|
||||
endif()
|
||||
set(__craylinux_crayprgenv_cray_cxx 1)
|
||||
|
||||
include(Compiler/CrayPrgEnv-CXX)
|
||||
__CrayPrgEnv_setup_CXX("/opt/cray/cce/.*/ccfe" "/opt/cray/cce/.*/ld")
|
@ -0,0 +1,7 @@
|
||||
if(__craylinux_crayprgenv_cray_fortran)
|
||||
return()
|
||||
endif()
|
||||
set(__craylinux_crayprgenv_cray_fortran 1)
|
||||
|
||||
include(Compiler/CrayPrgEnv-Fortran)
|
||||
__CrayPrgEnv_setup_Fortran("/opt/cray/cce/.*/ftnfe" "/opt/cray/cce/.*/ld")
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue