Imported Upstream version 3.5.0
This commit is contained in:
parent
8c275acb17
commit
4a69966b60
@ -177,7 +177,7 @@ the indentation. Otherwise it retains the same position on the line"
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^\\([ \t]*\\)\\(\\w+\\)\\([ \t]*(\\)" nil t)
|
||||
(while (re-search-forward "^\\([ \t]*\\)\\_<\\(\\(?:\\w\\|\\s_\\)+\\)\\_>\\([ \t]*(\\)" nil t)
|
||||
(replace-match
|
||||
(concat
|
||||
(match-string 1)
|
||||
|
@ -198,6 +198,17 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
|
||||
set(CPACK_WIX_UPGRADE_GUID "8ffd1d72-b7f1-11e2-8ee5-00238bca4991")
|
||||
|
||||
if(MSVC AND NOT "$ENV{WIX}" STREQUAL "")
|
||||
set(WIX_CUSTOM_ACTION_ENABLED TRUE)
|
||||
if(CMAKE_CONFIGURATION_TYPES)
|
||||
set(WIX_CUSTOM_ACTION_MULTI_CONFIG TRUE)
|
||||
else()
|
||||
set(WIX_CUSTOM_ACTION_MULTI_CONFIG FALSE)
|
||||
endif()
|
||||
else()
|
||||
set(WIX_CUSTOM_ACTION_ENABLED FALSE)
|
||||
endif()
|
||||
|
||||
# Set the options file that needs to be included inside CMakeCPackOptions.cmake
|
||||
set(QT_DIALOG_CPACK_OPTIONS_FILE ${CMake_BINARY_DIR}/Source/QtDialog/QtDialogCPack.cmake)
|
||||
configure_file("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in"
|
||||
|
@ -183,13 +183,20 @@ if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if("${CPACK_GENERATOR}" STREQUAL "DragNDrop")
|
||||
set(CPACK_DMG_BACKGROUND_IMAGE
|
||||
"@CMake_SOURCE_DIR@/Packaging/CMakeDMGBackground.tif")
|
||||
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT
|
||||
"@CMake_SOURCE_DIR@/Packaging/CMakeDMGSetup.scpt")
|
||||
endif()
|
||||
|
||||
if("${CPACK_GENERATOR}" STREQUAL "WIX")
|
||||
# Reset CPACK_PACKAGE_VERSION to deal with WiX restriction.
|
||||
# But the file names still use the full CMake_VERSION value:
|
||||
set(CPACK_PACKAGE_FILE_NAME
|
||||
"${CPACK_PACKAGE_NAME}-@CMake_VERSION@-${CPACK_SYSTEM_NAME}")
|
||||
"cmake-@CMake_VERSION@-${CPACK_SYSTEM_NAME}")
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME
|
||||
"${CPACK_PACKAGE_NAME}-@CMake_VERSION@-Source")
|
||||
"cmake-@CMake_VERSION@")
|
||||
|
||||
if(NOT CPACK_WIX_SIZEOF_VOID_P)
|
||||
set(CPACK_WIX_SIZEOF_VOID_P "@CMAKE_SIZEOF_VOID_P@")
|
||||
@ -227,10 +234,57 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX")
|
||||
set(CPACK_WIX_LIGHT_EXTRA_FLAGS "-dcl:high")
|
||||
|
||||
set(CPACK_WIX_UI_BANNER
|
||||
"@CMake_SOURCE_DIR@/Utilities/Release/cpack_wix_ui_banner.jpg"
|
||||
"@CMake_SOURCE_DIR@/Utilities/Release/WiX/ui_banner.jpg"
|
||||
)
|
||||
|
||||
set(CPACK_WIX_UI_DIALOG
|
||||
"@CMake_SOURCE_DIR@/Utilities/Release/cpack_wix_ui_dialog.jpg"
|
||||
"@CMake_SOURCE_DIR@/Utilities/Release/WiX/ui_dialog.jpg"
|
||||
)
|
||||
|
||||
set(CPACK_WIX_EXTRA_SOURCES
|
||||
"@CMake_SOURCE_DIR@/Utilities/Release/WiX/install_dir.wxs"
|
||||
"@CMake_SOURCE_DIR@/Utilities/Release/WiX/cmake_extra_dialog.wxs"
|
||||
)
|
||||
|
||||
set(_WIX_CUSTOM_ACTION_ENABLED "@WIX_CUSTOM_ACTION_ENABLED@")
|
||||
if(_WIX_CUSTOM_ACTION_ENABLED)
|
||||
list(APPEND CPACK_WIX_EXTRA_SOURCES
|
||||
"@CMake_SOURCE_DIR@/Utilities/Release/WiX/cmake_nsis_overwrite_dialog.wxs"
|
||||
)
|
||||
list(APPEND CPACK_WIX_CANDLE_EXTRA_FLAGS -dCHECK_NSIS=1)
|
||||
|
||||
set(_WIX_CUSTOM_ACTION_MULTI_CONFIG "@WIX_CUSTOM_ACTION_MULTI_CONFIG@")
|
||||
if(_WIX_CUSTOM_ACTION_MULTI_CONFIG)
|
||||
if(CPACK_BUILD_CONFIG)
|
||||
set(_WIX_CUSTOM_ACTION_CONFIG "${CPACK_BUILD_CONFIG}")
|
||||
else()
|
||||
set(_WIX_CUSTOM_ACTION_CONFIG "Release")
|
||||
endif()
|
||||
|
||||
list(APPEND CPACK_WIX_EXTRA_SOURCES
|
||||
"@CMake_BINARY_DIR@/Utilities/Release/WiX/custom_action_dll-${_WIX_CUSTOM_ACTION_CONFIG}.wxs")
|
||||
else()
|
||||
list(APPEND CPACK_WIX_EXTRA_SOURCES
|
||||
"@CMake_BINARY_DIR@/Utilities/Release/WiX/custom_action_dll.wxs")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CPACK_WIX_UI_REF "CMakeUI_InstallDir")
|
||||
|
||||
set(CPACK_WIX_PATCH_FILE
|
||||
"@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_path_env.xml"
|
||||
)
|
||||
|
||||
set(CPACK_WIX_TEMPLATE
|
||||
"@CMake_SOURCE_DIR@/Utilities/Release/WiX/WIX.template.in"
|
||||
)
|
||||
|
||||
set(BUILD_QtDialog "@BUILD_QtDialog@")
|
||||
|
||||
if(BUILD_QtDialog)
|
||||
list(APPEND CPACK_WIX_PATCH_FILE
|
||||
"@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_desktop_shortcut.xml"
|
||||
)
|
||||
list(APPEND CPACK_WIX_CANDLE_EXTRA_FLAGS -dBUILD_QtDialog=1)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -138,8 +138,13 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
|
||||
option(CMAKE_USE_SYSTEM_FORM "Use system-installed libform" "${CMAKE_USE_SYSTEM_LIBRARY_FORM}")
|
||||
option(CMAKE_USE_SYSTEM_JSONCPP "Use system-installed jsoncpp" "${CMAKE_USE_SYSTEM_LIBRARY_JSONCPP}")
|
||||
|
||||
# For now use system KWIML only if explicitly requested rather
|
||||
# than activating via the general system libs options.
|
||||
option(CMAKE_USE_SYSTEM_KWIML "Use system-installed KWIML" OFF)
|
||||
mark_as_advanced(CMAKE_USE_SYSTEM_KWIML)
|
||||
|
||||
# Mention to the user what system libraries are being used.
|
||||
foreach(util ${UTILITIES})
|
||||
foreach(util ${UTILITIES} KWIML)
|
||||
if(CMAKE_USE_SYSTEM_${util})
|
||||
message(STATUS "Using system-installed ${util}")
|
||||
endif()
|
||||
@ -270,6 +275,20 @@ macro (CMAKE_BUILD_UTILITIES)
|
||||
# (a macro defined in this file)
|
||||
CMAKE_HANDLE_SYSTEM_LIBRARIES()
|
||||
|
||||
if(CMAKE_USE_SYSTEM_KWIML)
|
||||
find_package(KWIML 1.0)
|
||||
if(NOT KWIML_FOUND)
|
||||
message(FATAL_ERROR "CMAKE_USE_SYSTEM_KWIML is ON but KWIML is not found!")
|
||||
endif()
|
||||
set(CMake_KWIML_LIBRARIES kwiml::kwiml)
|
||||
else()
|
||||
set(CMake_KWIML_LIBRARIES "")
|
||||
if(BUILD_TESTING)
|
||||
set(KWIML_TEST_ENABLE 1)
|
||||
endif()
|
||||
add_subdirectory(Utilities/KWIML)
|
||||
endif()
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Build zlib library for Curl, CMake, and CTest.
|
||||
set(CMAKE_ZLIB_HEADER "cm_zlib.h")
|
||||
@ -372,12 +391,14 @@ macro (CMAKE_BUILD_UTILITIES)
|
||||
set(ENABLE_LZMA ON CACHE INTERNAL "Enable the use of the system found LZMA library if found")
|
||||
set(ENABLE_ZLIB ON CACHE INTERNAL "Enable the use of the system found ZLIB library if found")
|
||||
set(ENABLE_BZip2 ON CACHE INTERNAL "Enable the use of the system found BZip2 library if found")
|
||||
set(ENABLE_LIBXML2 OFF CACHE INTERNAL "Enable the use of the system found libxml2 library if found")
|
||||
set(ENABLE_EXPAT OFF CACHE INTERNAL "Enable the use of the system found EXPAT library if found")
|
||||
set(ENABLE_PCREPOSIX OFF CACHE INTERNAL "Enable the use of the system found PCREPOSIX library if found")
|
||||
set(ENABLE_LibGCC OFF CACHE INTERNAL "Enable the use of the system found LibGCC library if found")
|
||||
set(ENABLE_XATTR OFF CACHE INTERNAL "Enable extended attribute support")
|
||||
set(ENABLE_ACL OFF CACHE INTERNAL "Enable ACL support")
|
||||
set(ENABLE_ICONV OFF CACHE INTERNAL "Enable iconv support")
|
||||
set(ENABLE_CNG OFF CACHE INTERNAL "Enable the use of CNG(Crypto Next Generation)")
|
||||
add_subdirectory(Utilities/cmlibarchive)
|
||||
CMAKE_SET_TARGET_FOLDER(cmlibarchive "Utilities/3rdParty")
|
||||
set(CMAKE_TAR_LIBRARIES cmlibarchive ${BZIP2_LIBRARIES})
|
||||
@ -536,10 +557,10 @@ if("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x")
|
||||
set(CMAKE_TESTS_CDASH_SERVER "http://open.cdash.org")
|
||||
endif()
|
||||
|
||||
# Create the KWIML library for CMake.
|
||||
set(KWIML cmIML)
|
||||
set(KWIML_HEADER_ROOT ${CMake_BINARY_DIR}/Utilities)
|
||||
add_subdirectory(Utilities/KWIML)
|
||||
if(CMake_TEST_EXTERNAL_CMAKE)
|
||||
set(KWIML_TEST_ENABLE 1)
|
||||
add_subdirectory(Utilities/KWIML)
|
||||
endif()
|
||||
|
||||
if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
||||
# build the utilities (a macro defined in this file)
|
||||
|
@ -21,7 +21,8 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
|
||||
"Utilities.cmcurl"
|
||||
"Utilities.cmexpat."
|
||||
"Utilities.cmlibarchive"
|
||||
"/usr/include.*warning.*shadowed declaration is here"
|
||||
"warning: declaration of .single. shadows a global declaration"
|
||||
"/usr/include.*(warning|note).*shadowed declaration is here"
|
||||
"/usr/bin/ld.*warning.*-..*directory.name.*bin.*does not exist"
|
||||
"Redeclaration of .send..... with a different storage class specifier"
|
||||
"is not used for resolving any symbol"
|
||||
@ -36,7 +37,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
|
||||
"LINK : warning LNK4089: all references to.*SHELL32.dll.*discarded by /OPT:REF"
|
||||
"LINK : warning LNK4089: all references to.*USER32.dll.*discarded by /OPT:REF"
|
||||
"LINK : warning LNK4089: all references to.*ole32.dll.*discarded by /OPT:REF"
|
||||
"Warning.*: .*/Utilities/KWIML/test/test_INT_format.h.* # Redundant preprocessing concatenation"
|
||||
"Warning.*: .*/Utilities/KWIML/test/test_int_format.h.* # Redundant preprocessing concatenation"
|
||||
"Warning: library was too large for page size.*"
|
||||
"Warning: public.*_archive_.*in module.*archive_*clashes with prior module.*archive_.*"
|
||||
"Warning: public.*BZ2_bz.*in module.*bzlib.*clashes with prior module.*bzlib.*"
|
||||
|
@ -1,5 +1,5 @@
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2015 Kitware, Inc.
|
||||
Copyright 2000-2016 Kitware, Inc.
|
||||
Copyright 2000-2011 Insight Software Consortium
|
||||
All rights reserved.
|
||||
|
||||
|
@ -178,7 +178,7 @@ target is already built, the command will not execute.
|
||||
|
||||
::
|
||||
|
||||
add_custom_command(TARGET target
|
||||
add_custom_command(TARGET <target>
|
||||
PRE_BUILD | PRE_LINK | POST_BUILD
|
||||
COMMAND command1 [ARGS] [args1...]
|
||||
[COMMAND command2 [ARGS] [args2...] ...]
|
||||
@ -188,7 +188,10 @@ target is already built, the command will not execute.
|
||||
[VERBATIM] [USES_TERMINAL])
|
||||
|
||||
This defines a new command that will be associated with building the
|
||||
specified target. When the command will happen is determined by which
|
||||
specified ``<target>``. The ``<target>`` must be defined in the current
|
||||
directory; targets defined in other directories may not be specified.
|
||||
|
||||
When the command will happen is determined by which
|
||||
of the following is specified:
|
||||
|
||||
``PRE_BUILD``
|
||||
|
@ -5,7 +5,7 @@ Set the minimum required version of cmake for a project.
|
||||
|
||||
::
|
||||
|
||||
cmake_minimum_required(VERSION major[.minor[.patch[.tweak]]]
|
||||
cmake_minimum_required(VERSION major.minor[.patch[.tweak]]
|
||||
[FATAL_ERROR])
|
||||
|
||||
If the current version of CMake is lower than that required it will
|
||||
|
85
Help/command/cmake_parse_arguments.rst
Normal file
85
Help/command/cmake_parse_arguments.rst
Normal file
@ -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``.
|
@ -13,6 +13,6 @@ the variable ``VAR``. If the property is not found, ``VAR`` will be set to
|
||||
Properties are usually used to control how a target is built, but some
|
||||
query the target instead. This command can get properties for any
|
||||
target so far created. The targets do not need to be in the current
|
||||
CMakeLists.txt file.
|
||||
``CMakeLists.txt`` file.
|
||||
|
||||
See also the more general :command:`get_property` command.
|
||||
|
@ -67,9 +67,10 @@ Possible expressions are:
|
||||
True if the given name is an existing policy (of the form ``CMP<NNNN>``).
|
||||
|
||||
``if(TARGET target-name)``
|
||||
True if the given name is an existing logical target name such as those
|
||||
created by the :command:`add_executable`, :command:`add_library`, or
|
||||
:command:`add_custom_target` commands.
|
||||
True if the given name is an existing logical target name created
|
||||
by a call to the :command:`add_executable`, :command:`add_library`,
|
||||
or :command:`add_custom_target` command that has already been invoked
|
||||
(in any directory).
|
||||
|
||||
``if(TEST test-name)``
|
||||
True if the given name is an existing test name created by the
|
||||
@ -80,7 +81,7 @@ Possible expressions are:
|
||||
only for full paths.
|
||||
|
||||
``if(file1 IS_NEWER_THAN file2)``
|
||||
True if file1 is newer than file2 or if one of the two files doesn't
|
||||
True if ``file1`` is newer than ``file2`` or if one of the two files doesn't
|
||||
exist. Behavior is well-defined only for full paths. If the file
|
||||
time stamps are exactly the same, an ``IS_NEWER_THAN`` comparison returns
|
||||
true, so that any dependent build operations will occur in the event
|
||||
|
@ -72,12 +72,13 @@ Installing Targets
|
||||
[[ARCHIVE|LIBRARY|RUNTIME|FRAMEWORK|BUNDLE|
|
||||
PRIVATE_HEADER|PUBLIC_HEADER|RESOURCE]
|
||||
[DESTINATION <dir>]
|
||||
[INCLUDES DESTINATION [<dir> ...]]
|
||||
[PERMISSIONS permissions...]
|
||||
[CONFIGURATIONS [Debug|Release|...]]
|
||||
[COMPONENT <component>]
|
||||
[OPTIONAL] [NAMELINK_ONLY|NAMELINK_SKIP]
|
||||
] [...])
|
||||
] [...]
|
||||
[INCLUDES DESTINATION [<dir> ...]]
|
||||
)
|
||||
|
||||
The ``TARGETS`` form specifies rules for installing targets from a
|
||||
project. There are five kinds of target files that may be installed:
|
||||
@ -97,11 +98,7 @@ change the type of target to which the subsequent properties apply.
|
||||
If none is given the installation properties apply to all target
|
||||
types. If only one is given then only targets of that type will be
|
||||
installed (which can be used to install just a DLL or just an import
|
||||
library). The ``INCLUDES DESTINATION`` specifies a list of directories
|
||||
which will be added to the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES`
|
||||
target property of the ``<targets>`` when exported by the
|
||||
:command:`install(EXPORT)` command. If a relative path is
|
||||
specified, it is treated as relative to the ``$<INSTALL_PREFIX>``.
|
||||
library).
|
||||
|
||||
The ``PRIVATE_HEADER``, ``PUBLIC_HEADER``, and ``RESOURCE`` arguments
|
||||
cause subsequent properties to be applied to installing a ``FRAMEWORK``
|
||||
@ -131,6 +128,14 @@ option installs nothing. See the :prop_tgt:`VERSION` and
|
||||
:prop_tgt:`SOVERSION` target properties for details on creating versioned
|
||||
shared libraries.
|
||||
|
||||
The ``INCLUDES DESTINATION`` specifies a list of directories
|
||||
which will be added to the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES`
|
||||
target property of the ``<targets>`` when exported by the
|
||||
:command:`install(EXPORT)` command. If a relative path is
|
||||
specified, it is treated as relative to the ``$<INSTALL_PREFIX>``.
|
||||
This is independent of the rest of the argument groups and does
|
||||
not actually install anything.
|
||||
|
||||
One or more groups of properties may be specified in a single call to
|
||||
the ``TARGETS`` form of this command. A target may be installed more than
|
||||
once to different locations. Consider hypothetical targets ``myExe``,
|
||||
@ -271,9 +276,10 @@ will install the ``icons`` directory to ``share/myproj/icons`` and the
|
||||
file permissions, the scripts will be given specific permissions, and any
|
||||
``CVS`` directories will be excluded.
|
||||
|
||||
The install destination given to the directory install ``DESTINATION`` may
|
||||
use "generator expressions" with the syntax ``$<...>``. See the
|
||||
:manual:`cmake-generator-expressions(7)` manual for available expressions.
|
||||
The list of ``dirs...`` given to ``DIRECTORY`` and the install destination
|
||||
given to the directory install ``DESTINATION`` may use "generator expressions"
|
||||
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
|
||||
manual for available expressions.
|
||||
|
||||
Custom Installation Logic
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -77,10 +77,47 @@
|
||||
Suppress developer warnings.
|
||||
|
||||
Suppress warnings that are meant for the author of the
|
||||
CMakeLists.txt files.
|
||||
CMakeLists.txt files. By default this will also turn off
|
||||
deprecation warnings.
|
||||
|
||||
``-Wdev``
|
||||
Enable developer warnings.
|
||||
|
||||
Enable warnings that are meant for the author of the CMakeLists.txt
|
||||
files.
|
||||
files. By default this will also turn on deprecation warnings.
|
||||
|
||||
``-Werror=dev``
|
||||
Make developer warnings errors.
|
||||
|
||||
Make warnings that are meant for the author of the CMakeLists.txt files
|
||||
errors. By default this will also turn on deprecated warnings as errors.
|
||||
|
||||
``-Wno-error=dev``
|
||||
Make developer warnings not errors.
|
||||
|
||||
Make warnings that are meant for the author of the CMakeLists.txt files not
|
||||
errors. By default this will also turn off deprecated warnings as errors.
|
||||
|
||||
``-Wdeprecated``
|
||||
Enable deprecated functionality warnings.
|
||||
|
||||
Enable warnings for usage of deprecated functionality, that are meant
|
||||
for the author of the CMakeLists.txt files.
|
||||
|
||||
``-Wno-deprecated``
|
||||
Suppress deprecated functionality warnings.
|
||||
|
||||
Suppress warnings for usage of deprecated functionality, that are meant
|
||||
for the author of the CMakeLists.txt files.
|
||||
|
||||
``-Werror=deprecated``
|
||||
Make deprecated macro and function warnings errors.
|
||||
|
||||
Make warnings for usage of deprecated macros and functions, that are meant
|
||||
for the author of the CMakeLists.txt files, errors.
|
||||
|
||||
``-Wno-error=deprecated``
|
||||
Make deprecated macro and function warnings not errors.
|
||||
|
||||
Make warnings for usage of deprecated macros and functions, that are meant
|
||||
for the author of the CMakeLists.txt files, not errors.
|
||||
|
@ -95,15 +95,18 @@ Apple Frameworks
|
||||
""""""""""""""""
|
||||
|
||||
A ``SHARED`` library may be marked with the :prop_tgt:`FRAMEWORK`
|
||||
target property to create an OS X Framework:
|
||||
target property to create an OS X or iOS Framework Bundle.
|
||||
The ``MACOSX_FRAMEWORK_IDENTIFIER`` sets ``CFBundleIdentifier`` key
|
||||
and it uniquely identifies the bundle.
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
add_library(MyFramework SHARED MyFramework.cpp)
|
||||
set_target_properties(MyFramework PROPERTIES
|
||||
FRAMEWORK 1
|
||||
FRAMEWORK TRUE
|
||||
FRAMEWORK_VERSION A
|
||||
)
|
||||
MACOSX_FRAMEWORK_IDENTIFIER org.cmake.MyFramework
|
||||
)
|
||||
|
||||
.. _`Object Libraries`:
|
||||
|
||||
@ -424,7 +427,7 @@ specified will be calculated:
|
||||
)
|
||||
|
||||
add_library(lib1Version3 SHARED lib1_v3.cpp)
|
||||
set_property(TARGET lib1Version2 PROPERTY INTERFACE_CONTAINER_SIZE_REQUIRED 1000)
|
||||
set_property(TARGET lib1Version3 PROPERTY INTERFACE_CONTAINER_SIZE_REQUIRED 1000)
|
||||
|
||||
add_executable(exe1 exe1.cpp)
|
||||
# CONTAINER_SIZE_REQUIRED will be "200"
|
||||
|
@ -29,6 +29,7 @@ These commands may be used freely in CMake projects.
|
||||
/command/build_command
|
||||
/command/cmake_host_system_information
|
||||
/command/cmake_minimum_required
|
||||
/command/cmake_parse_arguments
|
||||
/command/cmake_policy
|
||||
/command/configure_file
|
||||
/command/continue
|
||||
|
@ -718,7 +718,7 @@ same consideration applies to macros, functions and imported targets.
|
||||
If False, do not try to use the relevant CMake wrapping command.
|
||||
|
||||
``Xxx_Yy_FOUND``
|
||||
If False, optional Yy part of Xxx sytem is not available.
|
||||
If False, optional Yy part of Xxx system is not available.
|
||||
|
||||
``Xxx_FOUND``
|
||||
Set to false, or undefined, if we haven't found, or don't want to use
|
||||
|
@ -213,6 +213,7 @@ All Modules
|
||||
/module/FindwxWidgets
|
||||
/module/FindwxWindows
|
||||
/module/FindXCTest
|
||||
/module/FindXalanC
|
||||
/module/FindXercesC
|
||||
/module/FindX11
|
||||
/module/FindXMLRPC
|
||||
|
@ -89,7 +89,7 @@ a package is to set the ``CMAKE_PREFIX_PATH`` cache variable.
|
||||
|
||||
Config-file packages are provided by upstream vendors as part of development
|
||||
packages, that is, they belong with the header files and any other files
|
||||
provided to assist downsteams in using the package.
|
||||
provided to assist downstreams in using the package.
|
||||
|
||||
A set of variables which provide package status information are also set
|
||||
automatically when using a config-file package. The ``<Package>_FOUND``
|
||||
@ -352,7 +352,7 @@ version-specific variables ``<Package>_VERSION``, ``<Package>_VERSION_MAJOR``,
|
||||
used to export the targets in the ``ClimbingStatsTargets`` export-set, defined
|
||||
previously by the :command:`install(TARGETS)` command. This command generates
|
||||
the ``ClimbingStatsTargets.cmake`` file to contain :prop_tgt:`IMPORTED`
|
||||
targets, suitable for use by downsteams and arranges to install it to
|
||||
targets, suitable for use by downstreams and arranges to install it to
|
||||
``lib/cmake/ClimbingStats``. The generated ``ClimbingStatsConfigVersion.cmake``
|
||||
and a ``cmake/ClimbingStatsConfig.cmake`` are installed to the same location,
|
||||
completing the package.
|
||||
@ -383,7 +383,7 @@ In this case, when using :command:`install(TARGETS)` the ``INCLUDES DESTINATION`
|
||||
was specified. This causes the ``IMPORTED`` targets to have their
|
||||
:prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` populated with the ``include``
|
||||
directory in the :variable:`CMAKE_INSTALL_PREFIX`. When the ``IMPORTED``
|
||||
target is used by downsteam, it automatically consumes the entries from
|
||||
target is used by downstream, it automatically consumes the entries from
|
||||
that property.
|
||||
|
||||
Creating a Package Configuration File
|
||||
@ -412,7 +412,7 @@ This can also be extended to cover dependencies:
|
||||
target_link_libraries(ClimbingStats PUBLIC Stats::Types)
|
||||
|
||||
As the ``Stats::Types`` target is a ``PUBLIC`` dependency of ``ClimbingStats``,
|
||||
downsteams must also find the ``Stats`` package and link to the ``Stats::Types``
|
||||
downstreams must also find the ``Stats`` package and link to the ``Stats::Types``
|
||||
library. The ``Stats`` package should be found in the ``ClimbingStatsConfig.cmake``
|
||||
file to ensure this. The ``find_dependency`` macro from the
|
||||
:module:`CMakeFindDependencyMacro` helps with this by propagating
|
||||
@ -464,7 +464,7 @@ Creating a Package Configuration File for the Build Tree
|
||||
|
||||
The :command:`export(EXPORT)` command creates an :prop_tgt:`IMPORTED` targets
|
||||
definition file which is specific to the build-tree, and is not relocatable.
|
||||
This can similiarly be used with a suitable package configuration file and
|
||||
This can similarly be used with a suitable package configuration file and
|
||||
package version file to define a package for the build tree which may be used
|
||||
without installation. Consumers of the build tree can simply ensure that the
|
||||
:variable:`CMAKE_PREFIX_PATH` contains the build directory, or set the
|
||||
|
@ -191,6 +191,7 @@ Properties on Targets
|
||||
/prop_tgt/INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
|
||||
/prop_tgt/INTERPROCEDURAL_OPTIMIZATION_CONFIG
|
||||
/prop_tgt/INTERPROCEDURAL_OPTIMIZATION
|
||||
/prop_tgt/IOS_INSTALL_COMBINED
|
||||
/prop_tgt/JOB_POOL_COMPILE
|
||||
/prop_tgt/JOB_POOL_LINK
|
||||
/prop_tgt/LABELS
|
||||
|
@ -151,6 +151,36 @@ target system prefixes, whereas executables which must be run as part of the bui
|
||||
should be found only on the host and not on the target. This is the purpose of
|
||||
the ``CMAKE_FIND_ROOT_PATH_MODE_*`` variables.
|
||||
|
||||
.. _`Cray Cross-Compile`:
|
||||
|
||||
Cross Compiling for the Cray Linux Environment
|
||||
----------------------------------------------
|
||||
|
||||
Cross compiling for compute nodes in the Cray Linux Environment can be done
|
||||
without needing a separate toolchain file. Specifying
|
||||
``-DCMAKE_SYSTEM_NAME=CrayLinuxEnvironment`` on the CMake command line will
|
||||
ensure that the appropriate build settings and search paths are configured.
|
||||
The platform will pull its configuration from the current environment
|
||||
variables and will configure a project to use the compiler wrappers from the
|
||||
Cray Programming Environment's ``PrgEnv-*`` modules if present and loaded.
|
||||
|
||||
The default configuration of the Cray Programming Environment is to only
|
||||
support static libraries. This can be overridden and shared libraries
|
||||
enabled by setting the ``CRAYPE_LINK_TYPE`` environment variable to
|
||||
``dynamic``.
|
||||
|
||||
Running CMake without specifying :variable:`CMAKE_SYSTEM_NAME` will
|
||||
run the configure step in host mode assuming a standard Linux environment.
|
||||
If not overridden, the ``PrgEnv-*`` compiler wrappers will end up getting used,
|
||||
which if targeting the either the login node or compute node, is likely not the
|
||||
desired behavior. The exception to this would be if you are building directly
|
||||
on a NID instead of cross-compiling from a login node. If trying to build
|
||||
software for a login node, you will need to either first unload the
|
||||
currently loaded ``PrgEnv-*`` module or explicitly tell CMake to use the
|
||||
system compilers in ``/usr/bin`` instead of the Cray wrappers. If instead
|
||||
targeting a compute node is desired, just specify the
|
||||
:variable:`CMAKE_SYSTEM_NAME` as mentioned above.
|
||||
|
||||
Cross Compiling using Clang
|
||||
---------------------------
|
||||
|
||||
|
@ -118,6 +118,7 @@ Variables that Change Behavior
|
||||
/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName
|
||||
/variable/CMAKE_ERROR_DEPRECATED
|
||||
/variable/CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
|
||||
/variable/CMAKE_EXPORT_COMPILE_COMMANDS
|
||||
/variable/CMAKE_EXPORT_NO_PACKAGE_REGISTRY
|
||||
/variable/CMAKE_SYSROOT
|
||||
/variable/CMAKE_FIND_APPBUNDLE
|
||||
@ -257,6 +258,7 @@ Variables that Control the Build
|
||||
/variable/CMAKE_INSTALL_NAME_DIR
|
||||
/variable/CMAKE_INSTALL_RPATH
|
||||
/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH
|
||||
/variable/CMAKE_IOS_INSTALL_COMBINED
|
||||
/variable/CMAKE_LANG_COMPILER_LAUNCHER
|
||||
/variable/CMAKE_LANG_INCLUDE_WHAT_YOU_USE
|
||||
/variable/CMAKE_LANG_VISIBILITY_PRESET
|
||||
|
@ -167,16 +167,23 @@ Available commands are:
|
||||
Change the current working directory and run a command.
|
||||
|
||||
``compare_files <file1> <file2>``
|
||||
Check if file1 is same as file2.
|
||||
Check if ``<file1>`` is same as ``<file2>``. If files are the same,
|
||||
then returns 0, if not itreturns 1.
|
||||
|
||||
``copy <file> <destination>``
|
||||
Copy file to destination (either file or directory).
|
||||
``copy <file>... <destination>``
|
||||
Copy files to ``<destination>`` (either file or directory).
|
||||
If multiple files are specified, the ``<destination>`` must be
|
||||
directory and it must exist.
|
||||
|
||||
``copy_directory <source> <destination>``
|
||||
Copy directory 'source' content to directory 'destination'.
|
||||
``copy_directory <dir>... <destination>``
|
||||
Copy directories to ``<destination>`` directory.
|
||||
If ``<destination>`` directory does not exist it will be created.
|
||||
|
||||
``copy_if_different <in-file> <out-file>``
|
||||
Copy file if input has changed.
|
||||
``copy_if_different <file>... <destination>``
|
||||
Copy files to ``<destination>`` (either file or directory) if
|
||||
they have changed.
|
||||
If multiple files are specified, the ``<destination>`` must be
|
||||
directory and it must exist.
|
||||
|
||||
``echo [<string>...]``
|
||||
Displays arguments as text.
|
||||
@ -188,19 +195,23 @@ Available commands are:
|
||||
Run command in a modified environment.
|
||||
|
||||
``environment``
|
||||
Display the current environment.
|
||||
Display the current environment variables.
|
||||
|
||||
``make_directory <dir>``
|
||||
Create a directory.
|
||||
``make_directory <dir>...``
|
||||
Create ``<dir>`` directories. If necessary, create parent
|
||||
directories too. If a directory already exists it will be
|
||||
silently ignored.
|
||||
|
||||
``md5sum [<file>...]``
|
||||
``md5sum <file>...``
|
||||
Compute md5sum of files.
|
||||
|
||||
``remove [-f] [<file>...]``
|
||||
Remove the file(s), use ``-f`` to force it.
|
||||
``remove [-f] <file>...``
|
||||
Remove the file(s), use ``-f`` to force it. If a file does
|
||||
not exist it will be silently ignored.
|
||||
|
||||
``remove_directory <dir>``
|
||||
Remove a directory and its contents.
|
||||
Remove a directory and its contents. If a directory does
|
||||
not exist it will be silently ignored.
|
||||
|
||||
``rename <oldname> <newname>``
|
||||
Rename a file or directory (on one volume).
|
||||
@ -233,7 +244,8 @@ Available commands are:
|
||||
Touch a file.
|
||||
|
||||
``touch_nocreate <file>``
|
||||
Touch a file if it exists but do not create it.
|
||||
Touch a file if it exists but do not create it. If a file does
|
||||
not exist it will be silently ignored.
|
||||
|
||||
UNIX-specific Command-Line Tools
|
||||
--------------------------------
|
||||
|
1
Help/module/FindXalanC.rst
Normal file
1
Help/module/FindXalanC.rst
Normal file
@ -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.
|
||||
|
@ -12,9 +12,9 @@ dependency on the executable is created for targets that link to it.
|
||||
For DLL platforms an import library will be created for the exported
|
||||
symbols and then used for linking. All Windows-based systems
|
||||
including Cygwin are DLL platforms. For non-DLL platforms that
|
||||
require all symbols to be resolved at link time, such as Mac OS X, the
|
||||
require all symbols to be resolved at link time, such as OS X, the
|
||||
module will "link" to the executable using a flag like
|
||||
"-bundle_loader". For other non-DLL platforms the link rule is simply
|
||||
``-bundle_loader``. For other non-DLL platforms the link rule is simply
|
||||
ignored since the dynamic loader will automatically bind symbols when
|
||||
the module is loaded.
|
||||
|
||||
|
@ -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"
|
||||
)
|
||||
|
@ -3,3 +3,6 @@ FRAMEWORK_VERSION
|
||||
|
||||
Version of a framework created using the :prop_tgt:`FRAMEWORK` target
|
||||
property (e.g. ``A``).
|
||||
|
||||
This property only affects OS X, as iOS doesn't have versioned
|
||||
directory structure.
|
||||
|
11
Help/prop_tgt/IOS_INSTALL_COMBINED.rst
Normal file
11
Help/prop_tgt/IOS_INSTALL_COMBINED.rst
Normal file
@ -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,10 +1,10 @@
|
||||
MACOSX_BUNDLE_INFO_PLIST
|
||||
------------------------
|
||||
|
||||
Specify a custom ``Info.plist`` template for a Mac OS X App Bundle.
|
||||
Specify a custom ``Info.plist`` template for a OS X and iOS Application Bundle.
|
||||
|
||||
An executable target with :prop_tgt:`MACOSX_BUNDLE` enabled will be built as an
|
||||
application bundle on Mac OS X. By default its ``Info.plist`` file is created
|
||||
application bundle on OS X. By default its ``Info.plist`` file is created
|
||||
by configuring a template called ``MacOSXBundleInfo.plist.in`` located in the
|
||||
:variable:`CMAKE_MODULE_PATH`. This property specifies an alternative template
|
||||
file name which may be a full path.
|
||||
|
@ -1,10 +1,10 @@
|
||||
MACOSX_FRAMEWORK_INFO_PLIST
|
||||
---------------------------
|
||||
|
||||
Specify a custom ``Info.plist`` template for a Mac OS X Framework.
|
||||
Specify a custom ``Info.plist`` template for a OS X and iOS Framework.
|
||||
|
||||
A library target with :prop_tgt:`FRAMEWORK` enabled will be built as a
|
||||
framework on Mac OS X. By default its ``Info.plist`` file is created by
|
||||
framework on OS X. By default its ``Info.plist`` file is created by
|
||||
configuring a template called ``MacOSXFrameworkInfo.plist.in`` located in the
|
||||
:variable:`CMAKE_MODULE_PATH`. This property specifies an alternative template
|
||||
file name which may be a full path.
|
||||
|
@ -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.
|
||||
Specify resource files in a :prop_tgt:`FRAMEWORK` or :prop_tgt:`BUNDLE`.
|
||||
|
||||
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.
|
||||
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
|
||||
|
185
Help/release/3.5.rst
Normal file
185
Help/release/3.5.rst
Normal file
@ -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.
|
@ -11,6 +11,7 @@ Releases
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
3.5 <3.5>
|
||||
3.4 <3.4>
|
||||
3.3 <3.3>
|
||||
3.2 <3.2>
|
||||
|
@ -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.
|
||||
|
@ -6,3 +6,8 @@ The path to the top level of the build tree.
|
||||
This is the full path to the top level of the current CMake build
|
||||
tree. For an in-source build, this would be the same as
|
||||
:variable:`CMAKE_SOURCE_DIR`.
|
||||
|
||||
When run in -P script mode, CMake sets the variables
|
||||
:variable:`CMAKE_BINARY_DIR`, :variable:`CMAKE_SOURCE_DIR`,
|
||||
:variable:`CMAKE_CURRENT_BINARY_DIR` and
|
||||
:variable:`CMAKE_CURRENT_SOURCE_DIR` to the current working directory.
|
||||
|
@ -8,3 +8,8 @@ processed by cmake. Each directory added by :command:`add_subdirectory` will
|
||||
create a binary directory in the build tree, and as it is being
|
||||
processed this variable will be set. For in-source builds this is the
|
||||
current source directory being processed.
|
||||
|
||||
When run in -P script mode, CMake sets the variables
|
||||
:variable:`CMAKE_BINARY_DIR`, :variable:`CMAKE_SOURCE_DIR`,
|
||||
:variable:`CMAKE_CURRENT_BINARY_DIR` and
|
||||
:variable:`CMAKE_CURRENT_SOURCE_DIR` to the current working directory.
|
||||
|
@ -5,3 +5,8 @@ The path to the source directory currently being processed.
|
||||
|
||||
This the full path to the source directory that is currently being
|
||||
processed by cmake.
|
||||
|
||||
When run in -P script mode, CMake sets the variables
|
||||
:variable:`CMAKE_BINARY_DIR`, :variable:`CMAKE_SOURCE_DIR`,
|
||||
:variable:`CMAKE_CURRENT_BINARY_DIR` and
|
||||
:variable:`CMAKE_CURRENT_SOURCE_DIR` to the current working directory.
|
||||
|
@ -6,15 +6,15 @@ Specify whether an executable exports symbols for loadable modules.
|
||||
Normally an executable does not export any symbols because it is the
|
||||
final program. It is possible for an executable to export symbols to
|
||||
be used by loadable modules. When this property is set to true CMake
|
||||
will allow other targets to "link" to the executable with the
|
||||
will allow other targets to ``link`` to the executable with the
|
||||
:command:`TARGET_LINK_LIBRARIES` command. On all platforms a target-level
|
||||
dependency on the executable is created for targets that link to it.
|
||||
For DLL platforms an import library will be created for the exported
|
||||
symbols and then used for linking. All Windows-based systems
|
||||
including Cygwin are DLL platforms. For non-DLL platforms that
|
||||
require all symbols to be resolved at link time, such as Mac OS X, the
|
||||
module will "link" to the executable using a flag like
|
||||
"-bundle_loader". For other non-DLL platforms the link rule is simply
|
||||
require all symbols to be resolved at link time, such as OS X, the
|
||||
module will ``link`` to the executable using a flag like
|
||||
``-bundle_loader``. For other non-DLL platforms the link rule is simply
|
||||
ignored since the dynamic loader will automatically bind symbols when
|
||||
the module is loaded.
|
||||
|
||||
|
@ -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``.
|
||||
|
30
Help/variable/CMAKE_EXPORT_COMPILE_COMMANDS.rst
Normal file
30
Help/variable/CMAKE_EXPORT_COMPILE_COMMANDS.rst
Normal file
@ -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.
|
@ -4,5 +4,5 @@ CMAKE_HOST_SYSTEM_NAME
|
||||
Name of the OS CMake is running on.
|
||||
|
||||
On systems that have the uname command, this variable is set to the
|
||||
output of ``uname -s``. ``Linux``, ``Windows``, and ``Darwin`` for Mac OS X
|
||||
output of ``uname -s``. ``Linux``, ``Windows``, and ``Darwin`` for OS X
|
||||
are the values found on the big three operating systems.
|
||||
|
@ -1,7 +1,7 @@
|
||||
CMAKE_INSTALL_NAME_DIR
|
||||
----------------------
|
||||
|
||||
Mac OS X directory name for installed targets.
|
||||
OS X directory name for installed targets.
|
||||
|
||||
``CMAKE_INSTALL_NAME_DIR`` is used to initialize the
|
||||
:prop_tgt:`INSTALL_NAME_DIR` property on all targets. See that target
|
||||
|
8
Help/variable/CMAKE_IOS_INSTALL_COMBINED.rst
Normal file
8
Help/variable/CMAKE_IOS_INSTALL_COMBINED.rst
Normal file
@ -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.
|
@ -11,6 +11,7 @@ include:
|
||||
Absoft = Absoft Fortran (absoft.com)
|
||||
ADSP = Analog VisualDSP++ (analog.com)
|
||||
AppleClang = Apple Clang (apple.com)
|
||||
ARMCC = ARM Compiler (arm.com)
|
||||
CCur = Concurrent Fortran (ccur.com)
|
||||
Clang = LLVM Clang (clang.llvm.org)
|
||||
Cray = Cray Compiler (cray.com)
|
||||
|
@ -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,7 @@
|
||||
CMAKE_OSX_ARCHITECTURES
|
||||
-----------------------
|
||||
|
||||
Target specific architectures for OS X.
|
||||
Target specific architectures for OS X and iOS.
|
||||
|
||||
This variable is used to initialize the :prop_tgt:`OSX_ARCHITECTURES`
|
||||
property on each target as it is creaed. See that target property
|
||||
|
@ -6,3 +6,8 @@ The path to the top level of the source tree.
|
||||
This is the full path to the top level of the current CMake source
|
||||
tree. For an in-source build, this would be the same as
|
||||
:variable:`CMAKE_BINARY_DIR`.
|
||||
|
||||
When run in -P script mode, CMake sets the variables
|
||||
:variable:`CMAKE_BINARY_DIR`, :variable:`CMAKE_SOURCE_DIR`,
|
||||
:variable:`CMAKE_CURRENT_BINARY_DIR` and
|
||||
:variable:`CMAKE_CURRENT_SOURCE_DIR` to the current working directory.
|
||||
|
@ -8,4 +8,5 @@ specification of a target Windows version to select a corresponding SDK.
|
||||
The :variable:`CMAKE_SYSTEM_VERSION` variable may be set to specify a
|
||||
version. Otherwise CMake computes a default version based on the Windows
|
||||
SDK versions available. The chosen Windows target version number is provided
|
||||
in ``CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION``.
|
||||
in ``CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION``. If no Windows 10 SDK
|
||||
is available this value will be empty.
|
||||
|
@ -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.
|
||||
|
@ -8,3 +8,9 @@ in the generated Xcode project. Ignored on other generators.
|
||||
|
||||
See the :prop_tgt:`XCODE_ATTRIBUTE_<an-attribute>` target property
|
||||
to set attributes on a specific target.
|
||||
|
||||
Contents of ``CMAKE_XCODE_ATTRIBUTE_<an-attribute>`` may use
|
||||
"generator expressions" with the syntax ``$<...>``. See the
|
||||
:manual:`cmake-generator-expressions(7)` manual for available
|
||||
expressions. See the :manual:`cmake-buildsystem(7)` manual
|
||||
for more on defining buildsystem properties.
|
||||
|
@ -424,7 +424,9 @@ function(get_item_rpaths item rpaths_var)
|
||||
string(REGEX MATCHALL "rpath [^\n]+" load_cmds_ov "${load_cmds_ov}")
|
||||
string(REGEX REPLACE "rpath " "" load_cmds_ov "${load_cmds_ov}")
|
||||
if(load_cmds_ov)
|
||||
gp_append_unique(${rpaths_var} "${load_cmds_ov}")
|
||||
foreach(rpath ${load_cmds_ov})
|
||||
gp_append_unique(${rpaths_var} "${rpath}")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -2,6 +2,7 @@ set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@")
|
||||
set(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@")
|
||||
set(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@")
|
||||
set(CMAKE_C_COMPILER_VERSION "@CMAKE_C_COMPILER_VERSION@")
|
||||
set(CMAKE_C_COMPILER_WRAPPER "@CMAKE_C_COMPILER_WRAPPER@")
|
||||
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "@CMAKE_C_STANDARD_COMPUTED_DEFAULT@")
|
||||
set(CMAKE_C_COMPILE_FEATURES "@CMAKE_C_COMPILE_FEATURES@")
|
||||
set(CMAKE_C90_COMPILE_FEATURES "@CMAKE_C90_COMPILE_FEATURES@")
|
||||
|
@ -21,6 +21,10 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
||||
#endif
|
||||
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
#endif
|
||||
|
||||
@CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@
|
||||
@CMAKE_C_COMPILER_ID_ERROR_FOR_TEST@
|
||||
|
||||
@ -54,6 +58,9 @@ int main(int argc, char* argv[])
|
||||
#endif
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
require += info_cray[argc];
|
||||
#endif
|
||||
require += info_language_dialect_default[argc];
|
||||
(void)argv;
|
||||
|
@ -18,6 +18,8 @@
|
||||
# It also loads a system - compiler - processor (or target hardware)
|
||||
# specific file, which is mainly useful for crosscompiling and embedded systems.
|
||||
|
||||
include(CMakeLanguageInformation)
|
||||
|
||||
# some compilers use different extensions (e.g. sdcc uses .rel)
|
||||
# so set the extension here first so it can be overridden by the compiler specific file
|
||||
if(UNIX)
|
||||
@ -60,6 +62,12 @@ if (NOT _INCLUDED_FILE)
|
||||
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}
|
||||
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
|
||||
endif ()
|
||||
|
||||
# load any compiler-wrapper specific information
|
||||
if (CMAKE_C_COMPILER_WRAPPER)
|
||||
__cmake_include_compiler_wrapper(C)
|
||||
endif ()
|
||||
|
||||
# We specify the compiler information in the system file for some
|
||||
# platforms, but this language may not have been enabled when the file
|
||||
# was first included. Include it again to get the language info.
|
||||
|
@ -2,6 +2,7 @@ set(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@")
|
||||
set(CMAKE_CXX_COMPILER_ARG1 "@CMAKE_CXX_COMPILER_ARG1@")
|
||||
set(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@")
|
||||
set(CMAKE_CXX_COMPILER_VERSION "@CMAKE_CXX_COMPILER_VERSION@")
|
||||
set(CMAKE_CXX_COMPILER_WRAPPER "@CMAKE_CXX_COMPILER_WRAPPER@")
|
||||
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "@CMAKE_CXX_STANDARD_COMPUTED_DEFAULT@")
|
||||
set(CMAKE_CXX_COMPILE_FEATURES "@CMAKE_CXX_COMPILE_FEATURES@")
|
||||
set(CMAKE_CXX98_COMPILE_FEATURES "@CMAKE_CXX98_COMPILE_FEATURES@")
|
||||
|
@ -20,6 +20,10 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
||||
#endif
|
||||
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
#endif
|
||||
|
||||
@CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@
|
||||
@CMAKE_CXX_COMPILER_ID_ERROR_FOR_TEST@
|
||||
|
||||
@ -48,6 +52,9 @@ int main(int argc, char* argv[])
|
||||
#endif
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
require += info_cray[argc];
|
||||
#endif
|
||||
require += info_language_dialect_default[argc];
|
||||
(void)argv;
|
||||
|
@ -18,6 +18,8 @@
|
||||
# It also loads a system - compiler - processor (or target hardware)
|
||||
# specific file, which is mainly useful for crosscompiling and embedded systems.
|
||||
|
||||
include(CMakeLanguageInformation)
|
||||
|
||||
# some compilers use different extensions (e.g. sdcc uses .rel)
|
||||
# so set the extension here first so it can be overridden by the compiler specific file
|
||||
if(UNIX)
|
||||
@ -59,6 +61,12 @@ if (NOT _INCLUDED_FILE)
|
||||
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL
|
||||
RESULT_VARIABLE _INCLUDED_FILE)
|
||||
endif ()
|
||||
|
||||
# load any compiler-wrapper specific information
|
||||
if (CMAKE_CXX_COMPILER_WRAPPER)
|
||||
__cmake_include_compiler_wrapper(CXX)
|
||||
endif ()
|
||||
|
||||
# We specify the compiler information in the system file for some
|
||||
# platforms, but this language may not have been enabled when the file
|
||||
# was first included. Include it again to get the language info.
|
||||
|
@ -89,6 +89,7 @@ function(compiler_id_detection outvar lang)
|
||||
MSVC
|
||||
ADSP
|
||||
IAR
|
||||
ARMCC
|
||||
)
|
||||
if (lang STREQUAL C)
|
||||
list(APPEND ordered_compilers
|
||||
|
@ -92,6 +92,10 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
|
||||
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_IAR )
|
||||
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_IAR "IAR Assembler")
|
||||
|
||||
list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS ARMCC)
|
||||
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_ARMCC )
|
||||
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_ARMCC "(ARM Compiler)|(ARM Assembler)")
|
||||
|
||||
include(CMakeDetermineCompilerId)
|
||||
CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT})
|
||||
|
||||
|
@ -107,6 +107,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
|
||||
PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX}" PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_COMPILER_WRAPPER "${CMAKE_${lang}_COMPILER_WRAPPER}" PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT "${CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT}" PARENT_SCOPE)
|
||||
@ -182,9 +183,6 @@ Id flags: ${testflags}
|
||||
set(v 6)
|
||||
set(ext dsp)
|
||||
endif()
|
||||
if("${id_platform}" STREQUAL "Itanium")
|
||||
set(id_platform ia64)
|
||||
endif()
|
||||
if(CMAKE_VS_PLATFORM_TOOLSET)
|
||||
if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android")
|
||||
set(id_toolset "<NdkToolchainVersion>${CMAKE_VS_PLATFORM_TOOLSET}</NdkToolchainVersion>")
|
||||
@ -435,6 +433,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
|
||||
set(HAVE_COMPILER_VERSION_MINOR 0)
|
||||
set(HAVE_COMPILER_VERSION_PATCH 0)
|
||||
set(HAVE_COMPILER_VERSION_TWEAK 0)
|
||||
set(COMPILER_WRAPPER)
|
||||
set(DIGIT_VALUE_1 1)
|
||||
set(DIGIT_VALUE_2 10)
|
||||
set(DIGIT_VALUE_3 100)
|
||||
@ -476,6 +475,9 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
if("${info}" MATCHES "INFO:compiler_wrapper\\[([^]\"]*)\\]")
|
||||
set(COMPILER_WRAPPER "${CMAKE_MATCH_1}")
|
||||
endif()
|
||||
if("${info}" MATCHES "INFO:simulate\\[([^]\"]*)\\]")
|
||||
set(SIMULATE_ID "${CMAKE_MATCH_1}")
|
||||
endif()
|
||||
@ -588,6 +590,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
|
||||
set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
|
||||
PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_COMPILER_WRAPPER "${COMPILER_WRAPPER}" PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE)
|
||||
set(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE)
|
||||
|
@ -54,6 +54,7 @@ else()
|
||||
if(NOT CMAKE_Fortran_COMPILER_INIT)
|
||||
# Known compilers:
|
||||
# f77/f90/f95: generic compiler names
|
||||
# ftn: Cray fortran compiler wrapper
|
||||
# g77: GNU Fortran 77 compiler
|
||||
# gfortran: putative GNU Fortran 95+ compiler (in progress)
|
||||
# fort77: native F77 compiler under HP-UX (and some older Crays)
|
||||
@ -73,6 +74,7 @@ else()
|
||||
# then 77 or older compilers, gnu is always last in the group,
|
||||
# so if you paid for a compiler it is picked by default.
|
||||
set(CMAKE_Fortran_COMPILER_LIST
|
||||
ftn
|
||||
ifort ifc af95 af90 efc f95 pathf2003 pathf95 pgf95 pgfortran lf95 xlf95
|
||||
fort gfortran gfortran-4 g95 f90 pathf90 pgf90 xlf90 epcf90 fort77
|
||||
frt pgf77 xlf fl32 af77 g77 f77
|
||||
|
@ -2,11 +2,25 @@
|
||||
# CMakeForceCompiler
|
||||
# ------------------
|
||||
#
|
||||
# Discouraged. Avoid using this module if possible. It will be deprecated
|
||||
# by a future version of CMake once alternatives have been provided for all
|
||||
# toolchain file use cases.
|
||||
#
|
||||
# The macros provided by this module were once intended for use by
|
||||
# cross-compiling toolchain files when CMake was not able to automatically
|
||||
# detect the compiler identification. Since the introduction of this module,
|
||||
# CMake's compiler identification capabilities have improved and can now be
|
||||
# taught to recognize any compiler. Furthermore, the suite of information
|
||||
# CMake detects from a compiler is now too extensive to be provided by
|
||||
# toolchain files using these macros.
|
||||
#
|
||||
# This module defines macros intended for use by cross-compiling
|
||||
# toolchain files when CMake is not able to automatically detect the
|
||||
# compiler identification.
|
||||
# The only known remaining use case for these macros is to write toolchain
|
||||
# files for cross-compilers that cannot link binaries without special flags or
|
||||
# custom linker scripts. These macros cause CMake to skip checks it normally
|
||||
# performs as part of enabling a language and introspecting the toolchain.
|
||||
# However, skipping these checks may limit some generation functionality.
|
||||
#
|
||||
# -------------------------------------------------------------------------
|
||||
#
|
||||
# Macro CMAKE_FORCE_C_COMPILER has the following signature:
|
||||
#
|
||||
|
@ -2,6 +2,7 @@ set(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@")
|
||||
set(CMAKE_Fortran_COMPILER_ARG1 "@CMAKE_Fortran_COMPILER_ARG1@")
|
||||
set(CMAKE_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@")
|
||||
set(CMAKE_Fortran_COMPILER_VERSION "@CMAKE_Fortran_COMPILER_VERSION@")
|
||||
set(CMAKE_Fortran_COMPILER_WRAPPER "@CMAKE_Fortran_COMPILER_WRAPPER@")
|
||||
set(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@")
|
||||
set(CMAKE_Fortran_SIMULATE_ID "@CMAKE_Fortran_SIMULATE_ID@")
|
||||
set(CMAKE_Fortran_SIMULATE_VERSION "@CMAKE_Fortran_SIMULATE_VERSION@")
|
||||
|
@ -110,6 +110,9 @@
|
||||
# endif
|
||||
PRINT *, 'INFO:compiler[]'
|
||||
#endif
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
PRINT *, 'INFO:compiler_wrapper[CrayPrgEnv]'
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
! Identify the platform
|
||||
|
@ -12,6 +12,8 @@
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(CMakeLanguageInformation)
|
||||
|
||||
# This file sets the basic flags for the Fortran language in CMake.
|
||||
# It also loads the available platform file for the system-compiler
|
||||
# if it exists.
|
||||
@ -36,6 +38,12 @@ if (NOT _INCLUDED_FILE)
|
||||
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL
|
||||
RESULT_VARIABLE _INCLUDED_FILE)
|
||||
endif ()
|
||||
|
||||
# load any compiler-wrapper specific information
|
||||
if (CMAKE_Fortran_COMPILER_WRAPPER)
|
||||
__cmake_include_compiler_wrapper(Fortran)
|
||||
endif ()
|
||||
|
||||
# We specify the compiler information in the system file for some
|
||||
# platforms, but this language may not have been enabled when the file
|
||||
# was first included. Include it again to get the language info.
|
||||
|
297
Modules/CMakeIOSInstallCombined.cmake
Normal file
297
Modules/CMakeIOSInstallCombined.cmake
Normal file
@ -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()
|
37
Modules/CMakeLanguageInformation.cmake
Normal file
37
Modules/CMakeLanguageInformation.cmake
Normal file
@ -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 ()
|
@ -2,86 +2,10 @@
|
||||
# CMakeParseArguments
|
||||
# -------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords>
|
||||
# <multi_value_keywords> args...)
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# 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 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
|
||||
# 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 install() command.
|
||||
#
|
||||
# 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 install() command:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# 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:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# 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 (this option was not used when calling 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" (no value 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 MY_INSTALL_DESTINATION
|
||||
# would be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor.
|
||||
# This module once implemented the :command:`cmake_parse_arguments` command
|
||||
# that is now implemented natively by CMake. It is now an empty placeholder
|
||||
# for compatibility with projects that include it to get the command from
|
||||
# CMake 3.4 and lower.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2010 Alexander Neundorf <neundorf@kde.org>
|
||||
@ -95,67 +19,3 @@
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
|
||||
if(__CMAKE_PARSE_ARGUMENTS_INCLUDED)
|
||||
return()
|
||||
endif()
|
||||
set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE)
|
||||
|
||||
|
||||
function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames)
|
||||
# first set all result variables to empty/FALSE
|
||||
foreach(arg_name ${_singleArgNames} ${_multiArgNames})
|
||||
set(${prefix}_${arg_name})
|
||||
endforeach()
|
||||
|
||||
foreach(option ${_optionNames})
|
||||
set(${prefix}_${option} FALSE)
|
||||
endforeach()
|
||||
|
||||
set(${prefix}_UNPARSED_ARGUMENTS)
|
||||
|
||||
set(insideValues FALSE)
|
||||
set(currentArgName)
|
||||
|
||||
# now iterate over all arguments and fill the result variables
|
||||
foreach(currentArg ${ARGN})
|
||||
list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword
|
||||
list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword
|
||||
list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword
|
||||
|
||||
if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1)
|
||||
if(insideValues)
|
||||
if("${insideValues}" STREQUAL "SINGLE")
|
||||
set(${prefix}_${currentArgName} ${currentArg})
|
||||
set(insideValues FALSE)
|
||||
elseif("${insideValues}" STREQUAL "MULTI")
|
||||
list(APPEND ${prefix}_${currentArgName} ${currentArg})
|
||||
endif()
|
||||
else()
|
||||
list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
|
||||
endif()
|
||||
else()
|
||||
if(NOT ${optionIndex} EQUAL -1)
|
||||
set(${prefix}_${currentArg} TRUE)
|
||||
set(insideValues FALSE)
|
||||
elseif(NOT ${singleArgIndex} EQUAL -1)
|
||||
set(currentArgName ${currentArg})
|
||||
set(${prefix}_${currentArgName})
|
||||
set(insideValues "SINGLE")
|
||||
elseif(NOT ${multiArgIndex} EQUAL -1)
|
||||
set(currentArgName ${currentArg})
|
||||
set(${prefix}_${currentArgName})
|
||||
set(insideValues "MULTI")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
|
||||
# propagate the result variables to the caller:
|
||||
foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
|
||||
set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE)
|
||||
endforeach()
|
||||
set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
||||
|
@ -586,7 +586,7 @@ _cpack_set_default(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}")
|
||||
|
||||
# set sysroot so SDK tools can be used
|
||||
if(CMAKE_OSX_SYSROOT)
|
||||
_cpack_set_default(CPACK_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}")
|
||||
_cpack_set_default(CPACK_OSX_SYSROOT "${_CMAKE_OSX_SYSROOT_PATH}")
|
||||
endif()
|
||||
|
||||
if(DEFINED CPACK_COMPONENTS_ALL)
|
||||
|
@ -26,15 +26,56 @@
|
||||
# Path to a custom DS_Store file. This .DS_Store file e.g. can be used to
|
||||
# specify the Finder window position/geometry and layout (such as hidden
|
||||
# toolbars, placement of the icons etc.). This file has to be generated by
|
||||
# the Finder (either manually or through OSA-script) using a normal folder
|
||||
# the Finder (either manually or through AppleScript) using a normal folder
|
||||
# from which the .DS_Store file can then be extracted.
|
||||
#
|
||||
# .. variable:: CPACK_DMG_DS_STORE_SETUP_SCRIPT
|
||||
#
|
||||
# Path to a custom AppleScript file. This AppleScript is used to generate
|
||||
# a .DS_Store file which specifies the Finder window position/geometry and
|
||||
# layout (such as hidden toolbars, placement of the icons etc.).
|
||||
# By specifying a custom AppleScript there is no need to use
|
||||
# CPACK_DMG_DS_STORE, as the .DS_Store that is generated by the AppleScript
|
||||
# will be packaged.
|
||||
#
|
||||
# .. variable:: CPACK_DMG_BACKGROUND_IMAGE
|
||||
#
|
||||
# Path to a background image file. This file will be used as the background
|
||||
# for the Finder Window when the disk image is opened. By default no
|
||||
# background image is set. The background image is applied after applying the
|
||||
# custom .DS_Store file.
|
||||
# Path to an image file to be used as the background. This file will be
|
||||
# copied to .background/background.<ext>, where ext is the original image file
|
||||
# extension. The background image is installed into the image before
|
||||
# CPACK_DMG_DS_STORE_SETUP_SCRIPT is executed or CPACK_DMG_DS_STORE is
|
||||
# installed. By default no background image is set.
|
||||
#
|
||||
# .. variable:: CPACK_DMG_SLA_DIR
|
||||
#
|
||||
# Directory where license and menu files for different languages are stored.
|
||||
# Setting this causes CPack to look for a ``<language>.menu.txt`` and
|
||||
# ``<language>.license.txt`` file for every language defined in
|
||||
# ``CPACK_DMG_SLA_LANGUAGES``. If both this variable and
|
||||
# ``CPACK_RESOURCE_FILE_LICENSE`` are set, CPack will only look for the menu
|
||||
# files and use the same license file for all languages.
|
||||
#
|
||||
# .. variable:: CPACK_DMG_SLA_LANGUAGES
|
||||
#
|
||||
# Languages for which a license agreement is provided when mounting the
|
||||
# generated DMG. A menu file consists of 9 lines of text. The first line is
|
||||
# is the name of the language itself, uppercase, in English (e.g. German).
|
||||
# The other lines are translations of the following strings:
|
||||
#
|
||||
# - Agree
|
||||
# - Disagree
|
||||
# - Print
|
||||
# - Save...
|
||||
# - You agree to the terms of the License Agreement when you click the
|
||||
# "Agree" button.
|
||||
# - Software License Agreement
|
||||
# - This text cannot be saved. The disk may be full or locked, or the file
|
||||
# may be locked.
|
||||
# - Unable to print. Make sure you have selected a printer.
|
||||
#
|
||||
# For every language in this list, CPack will try to find files
|
||||
# ``<language>.menu.txt`` and ``<language>.license.txt`` in the directory
|
||||
# specified by the :variable:`CPACK_DMG_SLA_DIR` variable.
|
||||
#
|
||||
# .. variable:: CPACK_COMMAND_HDIUTIL
|
||||
#
|
||||
|
@ -8,7 +8,7 @@
|
||||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# CPackDeb may be used to create Deb package using CPack.
|
||||
# CPackDeb is a CPack generator thus it uses the CPACK_XXX variables
|
||||
# CPackDeb is a CPack generator thus it uses the ``CPACK_XXX`` variables
|
||||
# used by CPack : https://cmake.org/Wiki/CMake:CPackConfiguration.
|
||||
# CPackDeb generator should work on any linux host but it will produce
|
||||
# better deb package when Debian specific tools 'dpkg-xxx' are usable on
|
||||
@ -18,7 +18,7 @@
|
||||
# :code:`CPACK_DEBIAN_XXX` variables.
|
||||
#
|
||||
# :code:`CPACK_DEBIAN_<COMPONENT>_XXXX` variables may be used in order to have
|
||||
# **component** specific values. Note however that <COMPONENT> refers to the
|
||||
# **component** specific values. Note however that ``<COMPONENT>`` refers to the
|
||||
# **grouping name** written in upper case. It may be either a component name or
|
||||
# a component GROUP name.
|
||||
#
|
||||
@ -27,11 +27,20 @@
|
||||
# However as a handy reminder here comes the list of specific variables:
|
||||
#
|
||||
# .. variable:: CPACK_DEBIAN_PACKAGE_NAME
|
||||
# CPACK_DEBIAN_<COMPONENT>_PACKAGE_NAME
|
||||
#
|
||||
# The Debian package summary
|
||||
# Set Package control field (variable is automatically transformed to lower
|
||||
# case).
|
||||
#
|
||||
# * Mandatory : YES
|
||||
# * Default : :variable:`CPACK_PACKAGE_NAME` (lower case)
|
||||
# * Default :
|
||||
#
|
||||
# - :variable:`CPACK_PACKAGE_NAME` for non-component based
|
||||
# installations
|
||||
# - :variable:`CPACK_DEBIAN_PACKAGE_NAME` suffixed with -<COMPONENT>
|
||||
# for component-based installations.
|
||||
#
|
||||
# See https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Source
|
||||
#
|
||||
#
|
||||
# .. variable:: CPACK_DEBIAN_PACKAGE_VERSION
|
||||
@ -100,10 +109,16 @@
|
||||
#
|
||||
#
|
||||
# .. variable:: CPACK_DEBIAN_PACKAGE_SECTION
|
||||
# CPACK_DEBIAN_<COMPONENT>_PACKAGE_SECTION
|
||||
#
|
||||
# Set Section control field e.g. admin, devel, doc, ...
|
||||
#
|
||||
# * Mandatory : YES
|
||||
# * Default : 'devel'
|
||||
#
|
||||
# See https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
|
||||
#
|
||||
#
|
||||
# .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE
|
||||
#
|
||||
# The compression used for creating the Debian package.
|
||||
@ -114,12 +129,16 @@
|
||||
#
|
||||
#
|
||||
# .. variable:: CPACK_DEBIAN_PACKAGE_PRIORITY
|
||||
# CPACK_DEBIAN_<COMPONENT>_PACKAGE_PRIORITY
|
||||
#
|
||||
# The Debian package priority
|
||||
# Set Priority control field e.g. required, important, standard, optional,
|
||||
# extra
|
||||
#
|
||||
# * Mandatory : YES
|
||||
# * Default : 'optional'
|
||||
#
|
||||
# See https://www.debian.org/doc/debian-policy/ch-archive.html#s-priorities
|
||||
#
|
||||
#
|
||||
# .. variable:: CPACK_DEBIAN_PACKAGE_HOMEPAGE
|
||||
#
|
||||
@ -354,7 +373,28 @@
|
||||
# set by Debian policy
|
||||
# https://www.debian.org/doc/debian-policy/ch-files.html#s-permissions-owners
|
||||
#
|
||||
|
||||
# .. variable:: CPACK_DEBIAN_PACKAGE_SOURCE
|
||||
# CPACK_DEBIAN_<COMPONENT>_PACKAGE_SOURCE
|
||||
#
|
||||
# Sets the ``Source`` field of the binary Debian package.
|
||||
# When the binary package name is not the same as the source package name
|
||||
# (in particular when several components/binaries are generated from one
|
||||
# source) the source from which the binary has been generated should be
|
||||
# indicated with the field ``Source``.
|
||||
#
|
||||
# * Mandatory : NO
|
||||
# * Default :
|
||||
#
|
||||
# - An empty string for non-component based installations
|
||||
# - :variable:`CPACK_DEBIAN_PACKAGE_SOURCE` for component-based
|
||||
# installations.
|
||||
#
|
||||
# See https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Source
|
||||
#
|
||||
# .. note::
|
||||
#
|
||||
# This value is not interpreted. It is possible to pass an optional
|
||||
# revision number of the referenced source package as well.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2007-2009 Kitware, Inc.
|
||||
@ -554,24 +594,33 @@ function(cpack_deb_prepare_package_vars)
|
||||
)
|
||||
endif()
|
||||
|
||||
# Source: (optional)
|
||||
# in case several packages are constructed from a unique source
|
||||
# (multipackaging), the source may be indicated as well.
|
||||
# The source might contain a version if the generated package
|
||||
# version is different from the source version
|
||||
if(NOT CPACK_DEBIAN_PACKAGE_SOURCE)
|
||||
set(CPACK_DEBIAN_PACKAGE_SOURCE "")
|
||||
endif()
|
||||
|
||||
# have a look at get_property(result GLOBAL PROPERTY ENABLED_FEATURES),
|
||||
# this returns the successful find_package() calls, maybe this can help
|
||||
# Depends:
|
||||
# You should set: DEBIAN_PACKAGE_DEPENDS
|
||||
# TODO: automate 'objdump -p | grep NEEDED'
|
||||
|
||||
# if per-component dependency, overrides the global CPACK_DEBIAN_PACKAGE_${dependency_type_}
|
||||
# if per-component variable, overrides the global CPACK_DEBIAN_PACKAGE_${variable_type_}
|
||||
# automatic dependency discovery will be performed afterwards.
|
||||
if(CPACK_DEB_PACKAGE_COMPONENT)
|
||||
foreach(dependency_type_ DEPENDS RECOMMENDS SUGGESTS PREDEPENDS ENHANCES BREAKS CONFLICTS PROVIDES REPLACES)
|
||||
set(_component_var "CPACK_DEBIAN_${_local_component_name}_PACKAGE_${dependency_type_}")
|
||||
foreach(value_type_ DEPENDS RECOMMENDS SUGGESTS PREDEPENDS ENHANCES BREAKS CONFLICTS PROVIDES REPLACES SOURCE SECTION PRIORITY NAME)
|
||||
set(_component_var "CPACK_DEBIAN_${_local_component_name}_PACKAGE_${value_type_}")
|
||||
|
||||
# if set, overrides the global dependency
|
||||
# if set, overrides the global variable
|
||||
if(DEFINED ${_component_var})
|
||||
set(CPACK_DEBIAN_PACKAGE_${dependency_type_} "${${_component_var}}")
|
||||
set(CPACK_DEBIAN_PACKAGE_${value_type_} "${${_component_var}}")
|
||||
if(CPACK_DEBIAN_PACKAGE_DEBUG)
|
||||
message("CPackDeb Debug: component '${_local_component_name}' ${dependency_type_}"
|
||||
"dependencies set to '${CPACK_DEBIAN_PACKAGE_${dependency_}}'")
|
||||
message("CPackDeb Debug: component '${_local_component_name}' ${value_type_} "
|
||||
"value set to '${CPACK_DEBIAN_PACKAGE_${value_type_}}'")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
@ -664,23 +713,25 @@ function(cpack_deb_prepare_package_vars)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "-${CPACK_DEB_PACKAGE_COMPONENT}")
|
||||
string(TOLOWER "${CPACK_PACKAGE_NAME}${CPACK_DEB_PACKAGE_COMPONENT_PART_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
|
||||
else()
|
||||
set(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "")
|
||||
if(CPACK_DEBIAN_${_local_component_name}_PACKAGE_NAME)
|
||||
string(TOLOWER "${CPACK_DEBIAN_${_local_component_name}_PACKAGE_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
|
||||
else()
|
||||
string(TOLOWER "${CPACK_DEBIAN_PACKAGE_NAME}-${CPACK_DEB_PACKAGE_COMPONENT}" CPACK_DEBIAN_PACKAGE_NAME)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Print out some debug information if we were asked for that
|
||||
if(CPACK_DEBIAN_PACKAGE_DEBUG)
|
||||
message("CPackDeb:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
|
||||
message("CPackDeb:Debug: CPACK_TOPLEVEL_TAG = ${CPACK_TOPLEVEL_TAG}")
|
||||
message("CPackDeb:Debug: CPACK_TEMPORARY_DIRECTORY = ${CPACK_TEMPORARY_DIRECTORY}")
|
||||
message("CPackDeb:Debug: CPACK_OUTPUT_FILE_NAME = ${CPACK_OUTPUT_FILE_NAME}")
|
||||
message("CPackDeb:Debug: CPACK_OUTPUT_FILE_PATH = ${CPACK_OUTPUT_FILE_PATH}")
|
||||
message("CPackDeb:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
|
||||
message("CPackDeb:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
||||
message("CPackDeb:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
|
||||
message("CPackDeb:Debug: CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION = ${CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION}")
|
||||
message("CPackDeb:Debug: CPACK_TOPLEVEL_DIRECTORY = '${CPACK_TOPLEVEL_DIRECTORY}'")
|
||||
message("CPackDeb:Debug: CPACK_TOPLEVEL_TAG = '${CPACK_TOPLEVEL_TAG}'")
|
||||
message("CPackDeb:Debug: CPACK_TEMPORARY_DIRECTORY = '${CPACK_TEMPORARY_DIRECTORY}'")
|
||||
message("CPackDeb:Debug: CPACK_OUTPUT_FILE_NAME = '${CPACK_OUTPUT_FILE_NAME}'")
|
||||
message("CPackDeb:Debug: CPACK_OUTPUT_FILE_PATH = '${CPACK_OUTPUT_FILE_PATH}'")
|
||||
message("CPackDeb:Debug: CPACK_PACKAGE_FILE_NAME = '${CPACK_PACKAGE_FILE_NAME}'")
|
||||
message("CPackDeb:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = '${CPACK_PACKAGE_INSTALL_DIRECTORY}'")
|
||||
message("CPackDeb:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = '${CPACK_TEMPORARY_PACKAGE_FILE_NAME}'")
|
||||
message("CPackDeb:Debug: CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION = '${CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION}'")
|
||||
message("CPackDeb:Debug: CPACK_DEBIAN_PACKAGE_SOURCE = '${CPACK_DEBIAN_PACKAGE_SOURCE}'")
|
||||
endif()
|
||||
|
||||
# For debian source packages:
|
||||
@ -719,6 +770,8 @@ function(cpack_deb_prepare_package_vars)
|
||||
set(GEN_CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA}" PARENT_SCOPE)
|
||||
set(GEN_CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION
|
||||
"${CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION}" PARENT_SCOPE)
|
||||
set(GEN_CPACK_DEBIAN_PACKAGE_SOURCE
|
||||
"${CPACK_DEBIAN_PACKAGE_SOURCE}" PARENT_SCOPE)
|
||||
set(GEN_WDIR "${WDIR}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
@ -30,6 +30,14 @@
|
||||
#
|
||||
# undocumented.
|
||||
#
|
||||
# .. variable:: CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP
|
||||
#
|
||||
# The filename of a bitmap to use as the NSIS MUI_WELCOMEFINISHPAGE_BITMAP.
|
||||
#
|
||||
# .. variable:: CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP
|
||||
#
|
||||
# The filename of a bitmap to use as the NSIS MUI_UNWELCOMEFINISHPAGE_BITMAP.
|
||||
#
|
||||
# .. variable:: CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS
|
||||
#
|
||||
# Extra NSIS commands that will be added to the beginning of the install
|
||||
|
@ -37,6 +37,7 @@
|
||||
# * Default : CPACK_PACKAGE_DESCRIPTION_SUMMARY
|
||||
#
|
||||
# .. variable:: CPACK_RPM_PACKAGE_NAME
|
||||
# CPACK_RPM_<component>_PACKAGE_NAME
|
||||
#
|
||||
# The RPM package name.
|
||||
#
|
||||
@ -81,6 +82,7 @@
|
||||
# * Default : "unknown"
|
||||
#
|
||||
# .. variable:: CPACK_RPM_PACKAGE_GROUP
|
||||
# CPACK_RPM_<component>_PACKAGE_GROUP
|
||||
#
|
||||
# The RPM package group.
|
||||
#
|
||||
@ -1106,10 +1108,7 @@ function(cpack_rpm_generate_package)
|
||||
|
||||
# Are we packaging components ?
|
||||
if(CPACK_RPM_PACKAGE_COMPONENT)
|
||||
set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}")
|
||||
string(TOUPPER ${CPACK_RPM_PACKAGE_COMPONENT} CPACK_RPM_PACKAGE_COMPONENT_UPPER)
|
||||
else()
|
||||
set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "")
|
||||
endif()
|
||||
|
||||
set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}")
|
||||
@ -1143,10 +1142,19 @@ function(cpack_rpm_generate_package)
|
||||
endif()
|
||||
|
||||
# CPACK_RPM_PACKAGE_NAME (mandatory)
|
||||
|
||||
if(NOT CPACK_RPM_PACKAGE_NAME)
|
||||
string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_NAME)
|
||||
endif()
|
||||
|
||||
if(CPACK_RPM_PACKAGE_COMPONENT)
|
||||
if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_NAME)
|
||||
set(CPACK_RPM_PACKAGE_NAME ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_NAME})
|
||||
else()
|
||||
set(CPACK_RPM_PACKAGE_NAME ${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_COMPONENT})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# CPACK_RPM_PACKAGE_VERSION (mandatory)
|
||||
if(NOT CPACK_RPM_PACKAGE_VERSION)
|
||||
if(NOT CPACK_PACKAGE_VERSION)
|
||||
@ -1206,6 +1214,15 @@ function(cpack_rpm_generate_package)
|
||||
endif()
|
||||
|
||||
# CPACK_RPM_PACKAGE_GROUP
|
||||
|
||||
#Check for component group first.
|
||||
#If not set, it will use regular package group logic.
|
||||
if(CPACK_RPM_PACKAGE_COMPONENT)
|
||||
if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_GROUP)
|
||||
set(CPACK_RPM_PACKAGE_GROUP ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_GROUP})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT CPACK_RPM_PACKAGE_GROUP)
|
||||
set(CPACK_RPM_PACKAGE_GROUP "unknown")
|
||||
endif()
|
||||
@ -1613,7 +1630,7 @@ function(cpack_rpm_generate_package)
|
||||
)
|
||||
|
||||
# The name of the final spec file to be used by rpmbuild
|
||||
set(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.spec")
|
||||
set(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}.spec")
|
||||
|
||||
# Print out some debug information if we were asked for that
|
||||
if(CPACK_RPM_PACKAGE_DEBUG)
|
||||
@ -1645,7 +1662,7 @@ function(cpack_rpm_generate_package)
|
||||
"# -*- rpm-spec -*-
|
||||
BuildRoot: \@CPACK_RPM_DIRECTORY\@/\@CPACK_PACKAGE_FILE_NAME\@\@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH\@
|
||||
Summary: \@CPACK_RPM_PACKAGE_SUMMARY\@
|
||||
Name: \@CPACK_RPM_PACKAGE_NAME\@\@CPACK_RPM_PACKAGE_COMPONENT_PART_NAME\@
|
||||
Name: \@CPACK_RPM_PACKAGE_NAME\@
|
||||
Version: \@CPACK_RPM_PACKAGE_VERSION\@
|
||||
Release: \@CPACK_RPM_PACKAGE_RELEASE\@
|
||||
License: \@CPACK_RPM_PACKAGE_LICENSE\@
|
||||
@ -1749,15 +1766,15 @@ mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\" $RPM_BUILD_ROOT
|
||||
"${CPACK_RPM_BINARY_SPECFILE}"
|
||||
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}"
|
||||
RESULT_VARIABLE CPACK_RPMBUILD_EXEC_RESULT
|
||||
ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err"
|
||||
OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out")
|
||||
ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err"
|
||||
OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out")
|
||||
if(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT)
|
||||
file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err RPMBUILDERR)
|
||||
file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out RPMBUILDOUT)
|
||||
file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err RPMBUILDERR)
|
||||
file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out RPMBUILDOUT)
|
||||
message("CPackRPM:Debug: You may consult rpmbuild logs in: ")
|
||||
message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err")
|
||||
message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err")
|
||||
message("CPackRPM:Debug: *** ${RPMBUILDERR} ***")
|
||||
message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out")
|
||||
message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out")
|
||||
message("CPackRPM:Debug: *** ${RPMBUILDOUT} ***")
|
||||
endif()
|
||||
else()
|
||||
|
@ -119,7 +119,8 @@
|
||||
#
|
||||
# .. variable:: CPACK_WIX_PATCH_FILE
|
||||
#
|
||||
# Optional XML file with fragments to be inserted into generated WiX sources
|
||||
# Optional list of XML files with fragments to be inserted into
|
||||
# generated WiX sources
|
||||
#
|
||||
# This optional variable can be used to specify an XML file that the
|
||||
# WiX generator will use to inject fragments into its generated
|
||||
|
@ -93,7 +93,7 @@ macro(CHECK_C_SOURCE_COMPILES SOURCE VAR)
|
||||
message(STATUS "Performing Test ${VAR} - Success")
|
||||
endif()
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n"
|
||||
"Performing C SOURCE FILE Test ${VAR} succeeded with the following output:\n"
|
||||
"${OUTPUT}\n"
|
||||
"Source file was:\n${SOURCE}\n")
|
||||
else()
|
||||
|
@ -81,7 +81,7 @@ macro(CHECK_C_SOURCE_RUNS SOURCE VAR)
|
||||
message(STATUS "Performing Test ${VAR} - Success")
|
||||
endif()
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n"
|
||||
"Performing C SOURCE FILE Test ${VAR} succeeded with the following output:\n"
|
||||
"${OUTPUT}\n"
|
||||
"Return value: ${${VAR}}\n"
|
||||
"Source file was:\n${SOURCE}\n")
|
||||
|
@ -94,7 +94,7 @@ macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
|
||||
message(STATUS "Performing Test ${VAR} - Success")
|
||||
endif()
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n"
|
||||
"Performing C++ SOURCE FILE Test ${VAR} succeeded with the following output:\n"
|
||||
"${OUTPUT}\n"
|
||||
"Source file was:\n${SOURCE}\n")
|
||||
else()
|
||||
|
@ -82,7 +82,7 @@ macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
|
||||
message(STATUS "Performing Test ${VAR} - Success")
|
||||
endif()
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n"
|
||||
"Performing C++ SOURCE FILE Test ${VAR} succeeded with the following output:\n"
|
||||
"${OUTPUT}\n"
|
||||
"Return value: ${${VAR}}\n"
|
||||
"Source file was:\n${SOURCE}\n")
|
||||
|
@ -16,8 +16,8 @@ int main(int ac, char*av[]){
|
||||
pthread_create(&tid[0], 0, runner, (void*)1);
|
||||
pthread_create(&tid[1], 0, runner, (void*)2);
|
||||
|
||||
#if defined(__BEOS__) && !defined(__ZETA__) // (no usleep on BeOS 5.)
|
||||
usleep(1); // for strange behavior on single-processor sun
|
||||
#if defined(__BEOS__) && !defined(__ZETA__) /* (no usleep on BeOS 5.) */
|
||||
usleep(1); /* for strange behavior on single-processor sun */
|
||||
#endif
|
||||
|
||||
pthread_join(tid[0], 0);
|
||||
|
@ -94,7 +94,7 @@ macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR)
|
||||
message(STATUS "Performing Test ${VAR} - Success")
|
||||
endif()
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Performing Fortran SOURCE FILE Test ${VAR} succeded with the following output:\n"
|
||||
"Performing Fortran SOURCE FILE Test ${VAR} succeeded with the following output:\n"
|
||||
"${OUTPUT}\n"
|
||||
"Source file was:\n${SOURCE}\n")
|
||||
else()
|
||||
|
7
Modules/Compiler/ARMCC-ASM.cmake
Normal file
7
Modules/Compiler/ARMCC-ASM.cmake
Normal file
@ -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)
|
2
Modules/Compiler/ARMCC-C.cmake
Normal file
2
Modules/Compiler/ARMCC-C.cmake
Normal file
@ -0,0 +1,2 @@
|
||||
include(Compiler/ARMCC)
|
||||
__compiler_armcc(C)
|
2
Modules/Compiler/ARMCC-CXX.cmake
Normal file
2
Modules/Compiler/ARMCC-CXX.cmake
Normal file
@ -0,0 +1,2 @@
|
||||
include(Compiler/ARMCC)
|
||||
__compiler_armcc(CXX)
|
16
Modules/Compiler/ARMCC-DetermineCompiler.cmake
Normal file
16
Modules/Compiler/ARMCC-DetermineCompiler.cmake
Normal file
@ -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
|
||||
")
|
36
Modules/Compiler/ARMCC.cmake
Normal file
36
Modules/Compiler/ARMCC.cmake
Normal file
@ -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()
|
@ -6,7 +6,7 @@ if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
|
||||
endif()
|
||||
|
||||
cmake_policy(GET CMP0025 appleClangPolicy)
|
||||
if(WIN32 OR (APPLE AND NOT appleClangPolicy STREQUAL NEW))
|
||||
if(APPLE AND NOT appleClangPolicy STREQUAL NEW)
|
||||
return()
|
||||
endif()
|
||||
|
||||
@ -49,7 +49,7 @@ macro(cmake_record_cxx_compile_features)
|
||||
endmacro()
|
||||
|
||||
set(_result 0)
|
||||
if (UNIX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
|
||||
_get_clang_features(${CMAKE_CXX14_STANDARD_COMPILE_OPTION} CMAKE_CXX14_COMPILE_FEATURES)
|
||||
if (_result EQUAL 0)
|
||||
_get_clang_features(${CMAKE_CXX11_STANDARD_COMPILE_OPTION} CMAKE_CXX11_COMPILE_FEATURES)
|
||||
|
11
Modules/Compiler/CrayPrgEnv-C.cmake
Normal file
11
Modules/Compiler/CrayPrgEnv-C.cmake
Normal file
@ -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()
|
11
Modules/Compiler/CrayPrgEnv-CXX.cmake
Normal file
11
Modules/Compiler/CrayPrgEnv-CXX.cmake
Normal file
@ -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()
|
7
Modules/Compiler/CrayPrgEnv-Cray-C.cmake
Normal file
7
Modules/Compiler/CrayPrgEnv-Cray-C.cmake
Normal file
@ -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")
|
7
Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake
Normal file
7
Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake
Normal file
@ -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")
|
7
Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake
Normal file
7
Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake
Normal file
@ -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…
x
Reference in New Issue
Block a user