Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
2cd2db18bb
|
@ -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)
|
||||
|
|
|
@ -183,6 +183,13 @@ 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:
|
||||
|
|
|
@ -372,12 +372,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})
|
||||
|
|
|
@ -77,10 +77,23 @@
|
|||
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.
|
||||
|
||||
``-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.
|
||||
|
|
|
@ -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`:
|
||||
|
||||
|
|
|
@ -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
|
||||
---------------------------
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 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.
|
||||
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).
|
||||
|
||||
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,11 @@
|
|||
RESOURCE
|
||||
--------
|
||||
|
||||
Specify resource files in a FRAMEWORK shared library target.
|
||||
Specify resource 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 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.
|
||||
``Resources`` directory inside the framework folder. On non-Apple
|
||||
platforms these files may be installed using the ``RESOURCE`` option to
|
||||
the ``install(TARGETS)`` command.
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
0-sample-topic
|
||||
--------------
|
||||
|
||||
* This is a sample release note for the change in a topic.
|
||||
Developers should add similar notes for each topic branch
|
||||
making a noteworthy change. Each document should be named
|
||||
and titled to match the topic name to avoid merge conflicts.
|
|
@ -0,0 +1,6 @@
|
|||
FindFLEX-DEFINES_FILE
|
||||
---------------------
|
||||
|
||||
* The :module:`FindFLEX` module ``FLEX_TARGET`` macro learned a
|
||||
new ``DEFINES_FILE`` option to specify a custom output header
|
||||
to be generated.
|
|
@ -0,0 +1,7 @@
|
|||
FindGTK2_GTK2_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.
|
|
@ -0,0 +1,7 @@
|
|||
FindGTK2_sigc++_c++11
|
||||
---------------------
|
||||
|
||||
* Starting with sigc++ 2.5.1, c++11 must be enabled in order to use
|
||||
sigc++. The GTK2::sigc++ imported target will automatically enable the
|
||||
required build flags in order to build with the version found on the
|
||||
system.
|
|
@ -0,0 +1,6 @@
|
|||
FindOpenSSL-msvc-static-rt
|
||||
--------------------------
|
||||
|
||||
* The :module:`FindOpenSSL` module gained a new
|
||||
``OPENSSL_MSVC_STATIC_RT`` option to search for libraries using
|
||||
the MSVC static runtime.
|
|
@ -0,0 +1,4 @@
|
|||
FindXercesC-imported-targets
|
||||
----------------------------
|
||||
|
||||
* The :module:`FindXercesC` module now provides imported targets.
|
|
@ -0,0 +1,4 @@
|
|||
add-armcc-toolchain
|
||||
-------------------
|
||||
|
||||
* Support was added for the ARM Compiler (arm.com) with compiler id ``ARMCC``.
|
|
@ -0,0 +1,7 @@
|
|||
add-cray-linux-platform
|
||||
-----------------------
|
||||
|
||||
* 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.
|
|
@ -0,0 +1,8 @@
|
|||
better-looking-mac-packages
|
||||
---------------------------
|
||||
|
||||
* 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.
|
|
@ -0,0 +1,12 @@
|
|||
cmake-W-options
|
||||
---------------
|
||||
|
||||
* The :variable:`CMAKE_WARN_DEPRECATED` variable can now be set using the
|
||||
``-Wdeprecated`` and ``-Wno-deprecated`` :manual:`cmake(1)` options.
|
||||
|
||||
* The ``-Wdev`` and ``-Wno-dev`` :manual:`cmake(1)` options now also enable
|
||||
and suppress the deprecated warnings output by default.
|
||||
|
||||
* 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.
|
|
@ -0,0 +1,6 @@
|
|||
cmake-gui-select-toolset
|
||||
------------------------
|
||||
|
||||
* 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)`.
|
|
@ -0,0 +1,6 @@
|
|||
cpack-deb-config-file-source-field
|
||||
----------------------------------
|
||||
|
||||
* The :module:`CPackDeb` module learned to set optional config
|
||||
file ``Source`` field - monolithic and per-component variable.
|
||||
See :variable:`CPACK_DEBIAN_PACKAGE_SOURCE`.
|
|
@ -0,0 +1,7 @@
|
|||
cpack-deb-new-component-vars
|
||||
----------------------------
|
||||
|
||||
* The :module:`CPackDeb` module learned to set Package, Section
|
||||
and Priority control fields per-component.
|
||||
See :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_SECTION`
|
||||
and :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_PRIORITY`.
|
|
@ -0,0 +1,7 @@
|
|||
cpack-dmg-multilanguage-sla
|
||||
---------------------------
|
||||
|
||||
* 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.
|
|
@ -0,0 +1,6 @@
|
|||
cpack-nsis-bitmap
|
||||
-----------------
|
||||
|
||||
* 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.
|
|
@ -0,0 +1,5 @@
|
|||
deprecate-CMakeForceCompiler
|
||||
----------------------------
|
||||
|
||||
* The :module:`CMakeForceCompiler` module and its macros are now deprecated.
|
||||
See module documentation for an explanation.
|
|
@ -5,6 +5,8 @@ CMake Release Notes
|
|||
This file should include the adjacent "dev.txt" file
|
||||
in development versions but not in release versions.
|
||||
|
||||
.. include:: dev.txt
|
||||
|
||||
Releases
|
||||
========
|
||||
|
||||
|
|
|
@ -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``.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -2,7 +2,6 @@ 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_LINKS_STATICALLY "@CMAKE_C_COMPILER_LINKS_STATICALLY@")
|
||||
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@")
|
||||
|
|
|
@ -55,6 +55,7 @@ int main(int argc, char* argv[])
|
|||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
require += info_language_dialect_default[argc];
|
||||
(void)argv;
|
||||
return require;
|
||||
}
|
||||
|
|
|
@ -75,10 +75,6 @@ if(CMAKE_C_SIZEOF_DATA_PTR)
|
|||
unset(CMAKE_C_ABI_FILES)
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_LINKS_STATICALLY)
|
||||
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
|
||||
endif()
|
||||
|
||||
# This should be included before the _INIT variables are
|
||||
# used to initialize the cache. Since the rule variables
|
||||
# have if blocks on them, users can still define them here.
|
||||
|
|
|
@ -2,7 +2,6 @@ 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_LINKS_STATICALLY "@CMAKE_CXX_COMPILER_LINKS_STATICALLY@")
|
||||
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@")
|
||||
|
|
|
@ -49,6 +49,7 @@ int main(int argc, char* argv[])
|
|||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
require += info_language_dialect_default[argc];
|
||||
(void)argv;
|
||||
return require;
|
||||
}
|
||||
|
|
|
@ -74,10 +74,6 @@ if(CMAKE_CXX_SIZEOF_DATA_PTR)
|
|||
unset(CMAKE_CXX_ABI_FILES)
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_LINKS_STATICALLY)
|
||||
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
|
||||
endif()
|
||||
|
||||
# This should be included before the _INIT variables are
|
||||
# used to initialize the cache. Since the rule variables
|
||||
# have if blocks on them, users can still define them here.
|
||||
|
|
|
@ -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})
|
||||
|
||||
|
|
|
@ -106,7 +106,6 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
|
|||
set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
|
||||
PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX}" PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_COMPILER_LINKS_STATICALLY "${CMAKE_${lang}_COMPILER_LINKS_STATICALLY}" PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE)
|
||||
|
@ -533,13 +532,6 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
execute_process(COMMAND file "${file}" OUTPUT_VARIABLE out ERROR_VARIABLE out)
|
||||
if(out MATCHES "statically linked")
|
||||
set(CMAKE_${lang}_COMPILER_LINKS_STATICALLY 1 PARENT_SCOPE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Check if a valid compiler and platform were found.
|
||||
if(COMPILER_ID AND NOT COMPILER_ID_TWICE)
|
||||
set(CMAKE_${lang}_COMPILER_ID "${COMPILER_ID}")
|
||||
|
|
|
@ -2,11 +2,17 @@
|
|||
# CMakeForceCompiler
|
||||
# ------------------
|
||||
#
|
||||
# Deprecated. Do not use.
|
||||
#
|
||||
# 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.
|
||||
# -------------------------------------------------------------------------
|
||||
#
|
||||
# Macro CMAKE_FORCE_C_COMPILER has the following signature:
|
||||
#
|
||||
|
@ -64,6 +70,8 @@
|
|||
# License text for the above reference.)
|
||||
|
||||
macro(CMAKE_FORCE_C_COMPILER compiler id)
|
||||
message(DEPRECATION "The CMAKE_FORCE_C_COMPILER macro is deprecated. "
|
||||
"Instead just set CMAKE_C_COMPILER and allow CMake to identify the compiler.")
|
||||
set(CMAKE_C_COMPILER "${compiler}")
|
||||
set(CMAKE_C_COMPILER_ID_RUN TRUE)
|
||||
set(CMAKE_C_COMPILER_ID ${id})
|
||||
|
@ -76,6 +84,8 @@ macro(CMAKE_FORCE_C_COMPILER compiler id)
|
|||
endmacro()
|
||||
|
||||
macro(CMAKE_FORCE_CXX_COMPILER compiler id)
|
||||
message(DEPRECATION "The CMAKE_FORCE_CXX_COMPILER macro is deprecated. "
|
||||
"Instead just set CMAKE_CXX_COMPILER and allow CMake to identify the compiler.")
|
||||
set(CMAKE_CXX_COMPILER "${compiler}")
|
||||
set(CMAKE_CXX_COMPILER_ID_RUN TRUE)
|
||||
set(CMAKE_CXX_COMPILER_ID ${id})
|
||||
|
@ -88,6 +98,8 @@ macro(CMAKE_FORCE_CXX_COMPILER compiler id)
|
|||
endmacro()
|
||||
|
||||
macro(CMAKE_FORCE_Fortran_COMPILER compiler id)
|
||||
message(DEPRECATION "The CMAKE_FORCE_Fortran_COMPILER macro is deprecated. "
|
||||
"Instead just set CMAKE_Fortran_COMPILER and allow CMake to identify the compiler.")
|
||||
set(CMAKE_Fortran_COMPILER "${compiler}")
|
||||
set(CMAKE_Fortran_COMPILER_ID_RUN TRUE)
|
||||
set(CMAKE_Fortran_COMPILER_ID ${id})
|
||||
|
|
|
@ -2,7 +2,6 @@ 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_LINKS_STATICALLY "@CMAKE_Fortran_COMPILER_LINKS_STATICALLY@")
|
||||
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@")
|
||||
|
|
|
@ -47,6 +47,8 @@
|
|||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_F90 & 0xF)
|
||||
#elif defined(_CRAYFTN)
|
||||
PRINT *, 'INFO:compiler[Cray]'
|
||||
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
|
||||
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
|
||||
#elif defined(__G95__)
|
||||
PRINT *, 'INFO:compiler[G95]'
|
||||
# define COMPILER_VERSION_MAJOR DEC(__G95__)
|
||||
|
|
|
@ -51,10 +51,6 @@ if(CMAKE_Fortran_SIZEOF_DATA_PTR)
|
|||
unset(CMAKE_Fortran_ABI_FILES)
|
||||
endif()
|
||||
|
||||
if(CMAKE_Fortran_COMPILER_LINKS_STATICALLY)
|
||||
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
|
||||
endif()
|
||||
|
||||
# This should be included before the _INIT variables are
|
||||
# used to initialize the cache. Since the rule variables
|
||||
# have if blocks on them, users can still define them here.
|
||||
|
|
|
@ -587,7 +587,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
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
include(Compiler/ARMCC)
|
||||
|
||||
set(CMAKE_ASM_OUTPUT_EXTENSION ".o")
|
||||
set(CMAKE_ASM_OUTPUT_EXTENSION_REPLACE 1)
|
||||
|
||||
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>")
|
||||
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa)
|
|
@ -0,0 +1,2 @@
|
|||
include(Compiler/ARMCC)
|
||||
__compiler_armcc(C)
|
|
@ -0,0 +1,2 @@
|
|||
include(Compiler/ARMCC)
|
||||
__compiler_armcc(CXX)
|
|
@ -0,0 +1,16 @@
|
|||
# ARMCC Toolchain
|
||||
set(_compiler_id_pp_test "defined(__ARMCC_VERSION)")
|
||||
|
||||
set(_compiler_id_version_compute "
|
||||
#if __ARMCC_VERSION >= 1000000
|
||||
/* __ARMCC_VERSION = VRRPPPP */
|
||||
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__ARMCC_VERSION/1000000)
|
||||
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__ARMCC_VERSION/10000 % 100)
|
||||
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__ARMCC_VERSION % 10000)
|
||||
#else
|
||||
/* __ARMCC_VERSION = VRPPPP */
|
||||
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__ARMCC_VERSION/100000)
|
||||
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__ARMCC_VERSION/10000 % 10)
|
||||
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__ARMCC_VERSION % 10000)
|
||||
#endif
|
||||
")
|
|
@ -0,0 +1,36 @@
|
|||
if(_ARMCC_CMAKE_LOADED)
|
||||
return()
|
||||
endif()
|
||||
set(_ARMCC_CMAKE_LOADED TRUE)
|
||||
|
||||
# See ARM Compiler documentation at:
|
||||
# http://infocenter.arm.com/help/topic/com.arm.doc.set.swdev/index.html
|
||||
|
||||
get_filename_component(_CMAKE_C_TOOLCHAIN_LOCATION "${CMAKE_C_COMPILER}" PATH)
|
||||
get_filename_component(_CMAKE_CXX_TOOLCHAIN_LOCATION "${CMAKE_CXX_COMPILER}" PATH)
|
||||
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ".elf")
|
||||
|
||||
find_program(CMAKE_ARMCC_LINKER armlink HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" )
|
||||
find_program(CMAKE_ARMCC_AR armar HINTS "${_CMAKE_C_TOOLCHAIN_LOCATION}" "${_CMAKE_CXX_TOOLCHAIN_LOCATION}" )
|
||||
|
||||
set(CMAKE_LINKER "${CMAKE_ARMCC_LINKER}" CACHE FILEPATH "The ARMCC linker" FORCE)
|
||||
mark_as_advanced(CMAKE_ARMCC_LINKER)
|
||||
set(CMAKE_AR "${CMAKE_ARMCC_AR}" CACHE FILEPATH "The ARMCC archiver" FORCE)
|
||||
mark_as_advanced(CMAKE_ARMCC_AR)
|
||||
|
||||
macro(__compiler_armcc lang)
|
||||
set(CMAKE_${lang}_FLAGS_INIT "")
|
||||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Ospace -DNDEBUG")
|
||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-Otime -DNDEBUG")
|
||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
|
||||
set(CMAKE_${lang}_OUTPUT_EXTENSION ".o")
|
||||
set(CMAKE_${lang}_OUTPUT_EXTENSION_REPLACE 1)
|
||||
|
||||
set(CMAKE_${lang}_LINK_EXECUTABLE "<CMAKE_LINKER> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> <OBJECTS> -o <TARGET> --list <TARGET_BASE>.map")
|
||||
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "<CMAKE_AR> --create -cr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
|
||||
set(CMAKE_DEPFILE_FLAGS_${lang} "--depend=<DEPFILE> --depend_single_line --no_depend_system_headers")
|
||||
endmacro()
|
|
@ -18,6 +18,9 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0)
|
|||
message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}")
|
||||
endif()
|
||||
set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT})
|
||||
elseif(NOT DEFINED CMAKE_C_STANDARD_DEFAULT)
|
||||
# Compiler id was forced so just guess the default standard level.
|
||||
set(CMAKE_C_STANDARD_DEFAULT 99)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
@ -28,6 +28,9 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0)
|
|||
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
|
||||
elseif(NOT DEFINED CMAKE_CXX_STANDARD_DEFAULT)
|
||||
# Compiler id was forced so just guess the default standard level.
|
||||
set(CMAKE_CXX_STANDARD_DEFAULT 98)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
@ -23,6 +23,13 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
|
|||
message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}")
|
||||
endif()
|
||||
set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT})
|
||||
elseif(NOT DEFINED CMAKE_C_STANDARD_DEFAULT)
|
||||
# Compiler id was forced so just guess the default standard level.
|
||||
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.6)
|
||||
set(CMAKE_C_STANDARD_DEFAULT 11)
|
||||
else()
|
||||
set(CMAKE_C_STANDARD_DEFAULT 99)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
@ -37,6 +37,9 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
|
|||
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
|
||||
elseif(NOT DEFINED CMAKE_CXX_STANDARD_DEFAULT)
|
||||
# Compiler id was forced so just guess the default standard level.
|
||||
set(CMAKE_CXX_STANDARD_DEFAULT 98)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
@ -28,6 +28,13 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
|
|||
message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}")
|
||||
endif()
|
||||
set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT})
|
||||
elseif(NOT DEFINED CMAKE_C_STANDARD_DEFAULT)
|
||||
# Compiler id was forced so just guess the default standard level.
|
||||
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
|
||||
set(CMAKE_C_STANDARD_DEFAULT 11)
|
||||
else()
|
||||
set(CMAKE_C_STANDARD_DEFAULT 90)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
@ -40,6 +40,9 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)
|
|||
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
|
||||
elseif(NOT DEFINED CMAKE_CXX_STANDARD_DEFAULT)
|
||||
# Compiler id was forced so just guess the default standard level.
|
||||
set(CMAKE_CXX_STANDARD_DEFAULT 98)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
@ -42,6 +42,9 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13)
|
|||
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
|
||||
elseif(NOT DEFINED CMAKE_CXX_STANDARD_DEFAULT)
|
||||
# Compiler id was forced so just guess the default standard level.
|
||||
set(CMAKE_CXX_STANDARD_DEFAULT 98)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
@ -653,6 +653,9 @@ set(CUDA_VERSION_STRING "${CUDA_VERSION}")
|
|||
# Support for arm cross compilation with CUDA 5.5
|
||||
if(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm" AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf")
|
||||
set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf" CACHE PATH "Toolkit target location.")
|
||||
# Support for aarch64 cross compilation with CUDA 7.0
|
||||
elseif(CUDA_VERSION VERSION_GREATER "6.5" AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/aarch64-linux")
|
||||
set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT_DIR}/targets/aarch64-linux" CACHE PATH "Toolkit target location.")
|
||||
else()
|
||||
set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT_DIR}" CACHE PATH "Toolkit target location.")
|
||||
endif()
|
||||
|
@ -764,13 +767,9 @@ if(CUDA_USE_STATIC_CUDA_RUNTIME)
|
|||
if (NOT APPLE)
|
||||
# Here is librt that has things such as, clock_gettime, shm_open, and shm_unlink.
|
||||
find_library(CUDA_rt_LIBRARY rt)
|
||||
find_library(CUDA_dl_LIBRARY dl)
|
||||
if (NOT CUDA_rt_LIBRARY)
|
||||
message(WARNING "Expecting to find librt for libcudart_static, but didn't find it.")
|
||||
endif()
|
||||
if (NOT CUDA_dl_LIBRARY)
|
||||
message(WARNING "Expecting to find libdl for libcudart_static, but didn't find it.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
@ -793,13 +792,10 @@ set(CUDA_LIBRARIES)
|
|||
if(CUDA_BUILD_EMULATION AND CUDA_CUDARTEMU_LIBRARY)
|
||||
list(APPEND CUDA_LIBRARIES ${CUDA_CUDARTEMU_LIBRARY})
|
||||
elseif(CUDA_USE_STATIC_CUDA_RUNTIME AND CUDA_cudart_static_LIBRARY)
|
||||
list(APPEND CUDA_LIBRARIES ${CUDA_cudart_static_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
|
||||
list(APPEND CUDA_LIBRARIES ${CUDA_cudart_static_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
|
||||
if (CUDA_rt_LIBRARY)
|
||||
list(APPEND CUDA_LIBRARIES ${CUDA_rt_LIBRARY})
|
||||
endif()
|
||||
if (CUDA_dl_LIBRARY)
|
||||
list(APPEND CUDA_LIBRARIES ${CUDA_dl_LIBRARY})
|
||||
endif()
|
||||
if(APPLE)
|
||||
# We need to add the default path to the driver (libcuda.dylib) as an rpath, so that
|
||||
# the static cuda runtime can find it at runtime.
|
||||
|
|
|
@ -27,13 +27,17 @@
|
|||
#
|
||||
# ::
|
||||
#
|
||||
# FLEX_TARGET(Name FlexInput FlexOutput [COMPILE_FLAGS <string>])
|
||||
# FLEX_TARGET(Name FlexInput FlexOutput
|
||||
# [COMPILE_FLAGS <string>]
|
||||
# [DEFINES_FILE <string>]
|
||||
# )
|
||||
#
|
||||
# which creates a custom command to generate the <FlexOutput> file from
|
||||
# the <FlexInput> file. If COMPILE_FLAGS option is specified, the next
|
||||
# parameter is added to the flex command line. Name is an alias used to
|
||||
# get details of this custom command. Indeed the macro defines the
|
||||
# following variables:
|
||||
# parameter is added to the flex command line. If flex is configured to
|
||||
# output a header file, the DEFINES_FILE option may be used to specify its
|
||||
# name. Name is an alias used to get details of this custom command.
|
||||
# Indeed the macro defines the following variables:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
|
@ -41,6 +45,7 @@
|
|||
# FLEX_${Name}_OUTPUTS - the source file generated by the custom rule, an
|
||||
# alias for FlexOutput
|
||||
# FLEX_${Name}_INPUT - the flex source file, an alias for ${FlexInput}
|
||||
# FLEX_${Name}_OUTPUT_HEADER - the header flex output, if any.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
@ -113,6 +118,8 @@ find_path(FLEX_INCLUDE_DIR FlexLexer.h
|
|||
|
||||
mark_as_advanced(FL_LIBRARY FLEX_INCLUDE_DIR)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake)
|
||||
|
||||
set(FLEX_INCLUDE_DIRS ${FLEX_INCLUDE_DIR})
|
||||
set(FLEX_LIBRARIES ${FL_LIBRARY})
|
||||
|
||||
|
@ -145,31 +152,55 @@ if(FLEX_EXECUTABLE)
|
|||
#============================================================
|
||||
#
|
||||
macro(FLEX_TARGET Name Input Output)
|
||||
set(FLEX_TARGET_usage "FLEX_TARGET(<Name> <Input> <Output> [COMPILE_FLAGS <string>]")
|
||||
if(${ARGC} GREATER 3)
|
||||
if(${ARGC} EQUAL 5)
|
||||
if("${ARGV3}" STREQUAL "COMPILE_FLAGS")
|
||||
set(FLEX_EXECUTABLE_opts "${ARGV4}")
|
||||
separate_arguments(FLEX_EXECUTABLE_opts)
|
||||
else()
|
||||
message(SEND_ERROR ${FLEX_TARGET_usage})
|
||||
endif()
|
||||
set(FLEX_TARGET_outputs "${Output}")
|
||||
set(FLEX_EXECUTABLE_opts "")
|
||||
|
||||
set(FLEX_TARGET_PARAM_OPTIONS)
|
||||
set(FLEX_TARGET_PARAM_ONE_VALUE_KEYWORDS
|
||||
COMPILE_FLAGS
|
||||
DEFINES_FILE
|
||||
)
|
||||
set(FLEX_TARGET_PARAM_MULTI_VALUE_KEYWORDS)
|
||||
|
||||
cmake_parse_arguments(
|
||||
FLEX_TARGET_ARG
|
||||
"${FLEX_TARGET_PARAM_OPTIONS}"
|
||||
"${FLEX_TARGET_PARAM_ONE_VALUE_KEYWORDS}"
|
||||
"${FLEX_TARGET_MULTI_VALUE_KEYWORDS}"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
set(FLEX_TARGET_usage "FLEX_TARGET(<Name> <Input> <Output> [COMPILE_FLAGS <string>] [DEFINES_FILE <string>]")
|
||||
|
||||
if(NOT "${FLEX_TARGET_ARG_UNPARSED_ARGUMENTS}" STREQUAL "")
|
||||
message(SEND_ERROR ${FLEX_TARGET_usage})
|
||||
else()
|
||||
if(NOT "${FLEX_TARGET_ARG_COMPILE_FLAGS}" STREQUAL "")
|
||||
set(FLEX_EXECUTABLE_opts "${FLEX_TARGET_ARG_COMPILE_FLAGS}")
|
||||
separate_arguments(FLEX_EXECUTABLE_opts)
|
||||
endif()
|
||||
if(NOT "${FLEX_TARGET_ARG_DEFINES_FILE}" STREQUAL "")
|
||||
list(APPEND FLEX_TARGET_outputs "${FLEX_TARGET_ARG_DEFINES_FILE}")
|
||||
list(APPEND FLEX_EXECUTABLE_opts --header-file=${FLEX_TARGET_ARG_DEFINES_FILE})
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT ${FLEX_TARGET_outputs}
|
||||
COMMAND ${FLEX_EXECUTABLE}
|
||||
ARGS ${FLEX_EXECUTABLE_opts} -o${Output} ${Input}
|
||||
DEPENDS ${Input}
|
||||
COMMENT "[FLEX][${Name}] Building scanner with flex ${FLEX_VERSION}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
set(FLEX_${Name}_DEFINED TRUE)
|
||||
set(FLEX_${Name}_OUTPUTS ${Output})
|
||||
set(FLEX_${Name}_INPUT ${Input})
|
||||
set(FLEX_${Name}_COMPILE_FLAGS ${FLEX_EXECUTABLE_opts})
|
||||
if("${FLEX_TARGET_ARG_DEFINES_FILE}" STREQUAL "")
|
||||
set(FLEX_${Name}_OUTPUT_HEADER "")
|
||||
else()
|
||||
message(SEND_ERROR ${FLEX_TARGET_usage})
|
||||
set(FLEX_${Name}_OUTPUT_HEADER ${FLEX_TARGET_ARG_DEFINES_FILE})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT ${Output}
|
||||
COMMAND ${FLEX_EXECUTABLE}
|
||||
ARGS ${FLEX_EXECUTABLE_opts} -o${Output} ${Input}
|
||||
DEPENDS ${Input}
|
||||
COMMENT "[FLEX][${Name}] Building scanner with flex ${FLEX_VERSION}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
set(FLEX_${Name}_DEFINED TRUE)
|
||||
set(FLEX_${Name}_OUTPUTS ${Output})
|
||||
set(FLEX_${Name}_INPUT ${Input})
|
||||
set(FLEX_${Name}_COMPILE_FLAGS ${FLEX_EXECUTABLE_opts})
|
||||
endmacro()
|
||||
#============================================================
|
||||
|
||||
|
@ -181,11 +212,11 @@ if(FLEX_EXECUTABLE)
|
|||
macro(ADD_FLEX_BISON_DEPENDENCY FlexTarget BisonTarget)
|
||||
|
||||
if(NOT FLEX_${FlexTarget}_OUTPUTS)
|
||||
message(SEND_ERROR "Flex target `${FlexTarget}' does not exists.")
|
||||
message(SEND_ERROR "Flex target `${FlexTarget}' does not exist.")
|
||||
endif()
|
||||
|
||||
if(NOT BISON_${BisonTarget}_OUTPUT_HEADER)
|
||||
message(SEND_ERROR "Bison target `${BisonTarget}' does not exists.")
|
||||
message(SEND_ERROR "Bison target `${BisonTarget}' does not exist.")
|
||||
endif()
|
||||
|
||||
set_source_files_properties(${FLEX_${FlexTarget}_OUTPUTS}
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
# GTK2_FOUND - Were all of your specified components found?
|
||||
# GTK2_INCLUDE_DIRS - All include directories
|
||||
# GTK2_LIBRARIES - All libraries
|
||||
# GTK2_TARGETS - All imported targets
|
||||
# GTK2_DEFINITIONS - Additional compiler flags
|
||||
#
|
||||
#
|
||||
|
@ -202,6 +203,43 @@ function(_GTK2_GET_VERSION _OUT_major _OUT_minor _OUT_micro _gtkversion_hdr)
|
|||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
#=============================================================
|
||||
# _GTK2_SIGCXX_GET_VERSION
|
||||
# Internal function to parse the version number in
|
||||
# sigc++config.h
|
||||
# _OUT_major = Major version number
|
||||
# _OUT_minor = Minor version number
|
||||
# _OUT_micro = Micro version number
|
||||
# _sigcxxversion_hdr = Header file to parse
|
||||
#=============================================================
|
||||
|
||||
function(_GTK2_SIGCXX_GET_VERSION _OUT_major _OUT_minor _OUT_micro _sigcxxversion_hdr)
|
||||
file(STRINGS ${_sigcxxversion_hdr} _contents REGEX "#define SIGCXX_M[A-Z]+_VERSION[ \t]+")
|
||||
if(_contents)
|
||||
string(REGEX REPLACE ".*#define SIGCXX_MAJOR_VERSION[ \t]+([0-9]+).*" "\\1" ${_OUT_major} "${_contents}")
|
||||
string(REGEX REPLACE ".*#define SIGCXX_MINOR_VERSION[ \t]+([0-9]+).*" "\\1" ${_OUT_minor} "${_contents}")
|
||||
string(REGEX REPLACE ".*#define SIGCXX_MICRO_VERSION[ \t]+([0-9]+).*" "\\1" ${_OUT_micro} "${_contents}")
|
||||
|
||||
if(NOT ${_OUT_major} MATCHES "[0-9]+")
|
||||
message(FATAL_ERROR "Version parsing failed for SIGCXX_MAJOR_VERSION!")
|
||||
endif()
|
||||
if(NOT ${_OUT_minor} MATCHES "[0-9]+")
|
||||
message(FATAL_ERROR "Version parsing failed for SIGCXX_MINOR_VERSION!")
|
||||
endif()
|
||||
if(NOT ${_OUT_micro} MATCHES "[0-9]+")
|
||||
message(FATAL_ERROR "Version parsing failed for SIGCXX_MICRO_VERSION!")
|
||||
endif()
|
||||
|
||||
set(${_OUT_major} ${${_OUT_major}} PARENT_SCOPE)
|
||||
set(${_OUT_minor} ${${_OUT_minor}} PARENT_SCOPE)
|
||||
set(${_OUT_micro} ${${_OUT_micro}} PARENT_SCOPE)
|
||||
else()
|
||||
message(FATAL_ERROR "Include file ${_gtkversion_hdr} does not exist")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
#=============================================================
|
||||
# _GTK2_FIND_INCLUDE_DIR
|
||||
# Internal function to find the GTK include directories
|
||||
|
@ -513,6 +551,9 @@ function(_GTK2_ADD_TARGET _var)
|
|||
|
||||
add_library(GTK2::${_basename} UNKNOWN IMPORTED)
|
||||
|
||||
set(GTK2_TARGETS ${GTK2_TARGETS} GTK2::${_basename})
|
||||
set(GTK2_TARGETS ${GTK2_TARGETS} PARENT_SCOPE)
|
||||
|
||||
if(GTK2_${_var}_LIBRARY_RELEASE)
|
||||
set_property(TARGET GTK2::${_basename} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_property(TARGET GTK2::${_basename} PROPERTY IMPORTED_LOCATION_RELEASE "${GTK2_${_var}_LIBRARY_RELEASE}" )
|
||||
|
@ -565,6 +606,7 @@ endfunction()
|
|||
set(GTK2_FOUND)
|
||||
set(GTK2_INCLUDE_DIRS)
|
||||
set(GTK2_LIBRARIES)
|
||||
set(GTK2_TARGETS)
|
||||
set(GTK2_DEFINITIONS)
|
||||
|
||||
if(NOT GTK2_FIND_COMPONENTS)
|
||||
|
@ -734,6 +776,27 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
|
|||
_GTK2_FIND_INCLUDE_DIR(SIGC++CONFIG sigc++config.h)
|
||||
_GTK2_FIND_LIBRARY (SIGC++ sigc true true)
|
||||
_GTK2_ADD_TARGET (SIGC++)
|
||||
# Since sigc++ 2.5.1 c++11 support is required
|
||||
if(GTK2_SIGC++CONFIG_INCLUDE_DIR)
|
||||
_GTK2_SIGCXX_GET_VERSION(GTK2_SIGC++_VERSION_MAJOR
|
||||
GTK2_SIGC++_VERSION_MINOR
|
||||
GTK2_SIGC++_VERSION_MICRO
|
||||
${GTK2_SIGC++CONFIG_INCLUDE_DIR}/sigc++config.h)
|
||||
if(NOT ${GTK2_SIGC++_VERSION_MAJOR}.${GTK2_SIGC++_VERSION_MINOR}.${GTK2_SIGC++_VERSION_MICRO} VERSION_LESS 2.5.1)
|
||||
# These are the features needed by clients in order to include the
|
||||
# project headers:
|
||||
set_property(TARGET GTK2::sigc++
|
||||
PROPERTY INTERFACE_COMPILE_FEATURES cxx_alias_templates
|
||||
cxx_auto_type
|
||||
cxx_decltype
|
||||
cxx_deleted_functions
|
||||
cxx_noexcept
|
||||
cxx_nullptr
|
||||
cxx_right_angle_brackets
|
||||
cxx_rvalue_references
|
||||
cxx_variadic_templates)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GLIBMM glibmm.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GLIBMMCONFIG glibmmconfig.h)
|
||||
|
@ -882,6 +945,11 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
|
|||
endif()
|
||||
endforeach()
|
||||
|
||||
if(GTK2_USE_IMPORTED_TARGETS)
|
||||
set(GTK2_LIBRARIES ${GTK2_TARGETS})
|
||||
endif()
|
||||
|
||||
|
||||
if(_GTK2_did_we_find_everything AND NOT GTK2_VERSION_CHECK_FAILED)
|
||||
set(GTK2_FOUND true)
|
||||
else()
|
||||
|
@ -893,6 +961,7 @@ else()
|
|||
set(GTK2_VERSION_PATCH)
|
||||
set(GTK2_INCLUDE_DIRS)
|
||||
set(GTK2_LIBRARIES)
|
||||
set(GTK2_TARGETS)
|
||||
set(GTK2_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -124,11 +124,11 @@ function(GTEST_ADD_TESTS executable extra_args)
|
|||
string(REGEX MATCH "${gtest_test_type_regex}" test_type ${hit})
|
||||
|
||||
# Parameterized tests have a different signature for the filter
|
||||
if(${test_type} STREQUAL "TEST_P")
|
||||
if("x${test_type}" STREQUAL "xTEST_P")
|
||||
string(REGEX REPLACE ${gtest_case_name_regex} "*/\\1.\\2/*" test_name ${hit})
|
||||
elseif(${test_type} STREQUAL "TEST_F" OR ${test_type} STREQUAL "TEST")
|
||||
elseif("x${test_type}" STREQUAL "xTEST_F" OR "x${test_type}" STREQUAL "xTEST")
|
||||
string(REGEX REPLACE ${gtest_case_name_regex} "\\1.\\2" test_name ${hit})
|
||||
elseif(${test_type} STREQUAL "TYPED_TEST")
|
||||
elseif("x${test_type}" STREQUAL "xTYPED_TEST")
|
||||
string(REGEX REPLACE ${gtest_case_name_regex} "\\1/*.\\2" test_name ${hit})
|
||||
else()
|
||||
message(WARNING "Could not parse GTest ${hit} for adding to CTest.")
|
||||
|
|
|
@ -48,17 +48,21 @@ if(WIN32)
|
|||
# GitHub search path for Windows
|
||||
set(github_path "$ENV{LOCALAPPDATA}/Github/PortableGit*/bin")
|
||||
file(GLOB github_path "${github_path}")
|
||||
# SourceTree search path for Windows
|
||||
set(_git_sourcetree_path "$ENV{LOCALAPPDATA}/Atlassian/SourceTree/git_local/bin")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_program(GIT_EXECUTABLE
|
||||
NAMES ${git_names}
|
||||
PATHS ${github_path}
|
||||
PATHS ${github_path} ${_git_sourcetree_path}
|
||||
PATH_SUFFIXES Git/cmd Git/bin
|
||||
DOC "git command line client"
|
||||
)
|
||||
mark_as_advanced(GIT_EXECUTABLE)
|
||||
|
||||
unset(_git_sourcetree_path)
|
||||
|
||||
if(GIT_EXECUTABLE)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} --version
|
||||
OUTPUT_VARIABLE git_version
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#
|
||||
# Set ``OPENSSL_ROOT_DIR`` to the root directory of an OpenSSL installation.
|
||||
# Set ``OPENSSL_USE_STATIC_LIBS`` to ``TRUE`` to look for static libraries.
|
||||
# Set ``OPENSSL_MSVC_STATIC_RT`` set ``TRUE`` to choose the MT version of the lib.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2006-2009 Kitware, Inc.
|
||||
|
@ -113,7 +114,7 @@ if(WIN32 AND NOT CYGWIN)
|
|||
# /MD and /MDd are the standard values - if someone wants to use
|
||||
# others, the libnames have to change here too
|
||||
# use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b
|
||||
# TODO: handle /MT and static lib
|
||||
# enable OPENSSL_MSVC_STATIC_RT to get the libs build /MT (Multithreaded no-DLL)
|
||||
# In Visual C++ naming convention each of these four kinds of Windows libraries has it's standard suffix:
|
||||
# * MD for dynamic-release
|
||||
# * MDd for dynamic-debug
|
||||
|
@ -126,6 +127,12 @@ if(WIN32 AND NOT CYGWIN)
|
|||
# ssleay32MD.lib is identical to ../ssleay32.lib
|
||||
# enable OPENSSL_USE_STATIC_LIBS to use the static libs located in lib/VC/static
|
||||
|
||||
if (OPENSSL_MSVC_STATIC_RT)
|
||||
set(_OPENSSL_MSVC_RT_MODE "MT")
|
||||
else ()
|
||||
set(_OPENSSL_MSVC_RT_MODE "MD")
|
||||
endif ()
|
||||
|
||||
if(OPENSSL_USE_STATIC_LIBS)
|
||||
set(_OPENSSL_PATH_SUFFIXES
|
||||
"lib"
|
||||
|
@ -142,7 +149,7 @@ if(WIN32 AND NOT CYGWIN)
|
|||
|
||||
find_library(LIB_EAY_DEBUG
|
||||
NAMES
|
||||
libeay32MDd
|
||||
libeay32${_OPENSSL_MSVC_RT_MODE}d
|
||||
libeay32d
|
||||
${_OPENSSL_ROOT_HINTS_AND_PATHS}
|
||||
PATH_SUFFIXES
|
||||
|
@ -151,7 +158,7 @@ if(WIN32 AND NOT CYGWIN)
|
|||
|
||||
find_library(LIB_EAY_RELEASE
|
||||
NAMES
|
||||
libeay32MD
|
||||
libeay32${_OPENSSL_MSVC_RT_MODE}
|
||||
libeay32
|
||||
${_OPENSSL_ROOT_HINTS_AND_PATHS}
|
||||
PATH_SUFFIXES
|
||||
|
@ -160,7 +167,7 @@ if(WIN32 AND NOT CYGWIN)
|
|||
|
||||
find_library(SSL_EAY_DEBUG
|
||||
NAMES
|
||||
ssleay32MDd
|
||||
ssleay32${_OPENSSL_MSVC_RT_MODE}d
|
||||
ssleay32d
|
||||
${_OPENSSL_ROOT_HINTS_AND_PATHS}
|
||||
PATH_SUFFIXES
|
||||
|
@ -169,7 +176,7 @@ if(WIN32 AND NOT CYGWIN)
|
|||
|
||||
find_library(SSL_EAY_RELEASE
|
||||
NAMES
|
||||
ssleay32MD
|
||||
ssleay32${_OPENSSL_MSVC_RT_MODE}
|
||||
ssleay32
|
||||
ssl
|
||||
${_OPENSSL_ROOT_HINTS_AND_PATHS}
|
||||
|
@ -193,12 +200,8 @@ if(WIN32 AND NOT CYGWIN)
|
|||
set(OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} )
|
||||
elseif(MINGW)
|
||||
# same player, for MinGW
|
||||
set(LIB_EAY_NAMES libeay32)
|
||||
set(SSL_EAY_NAMES ssleay32)
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
list(APPEND LIB_EAY_NAMES crypto)
|
||||
list(APPEND SSL_EAY_NAMES ssl)
|
||||
endif()
|
||||
set(LIB_EAY_NAMES crypto libeay32)
|
||||
set(SSL_EAY_NAMES ssl ssleay32)
|
||||
find_library(LIB_EAY
|
||||
NAMES
|
||||
${LIB_EAY_NAMES}
|
||||
|
@ -318,7 +321,7 @@ endfunction()
|
|||
if (OPENSSL_INCLUDE_DIR)
|
||||
if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
|
||||
file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
|
||||
REGEX "^# *define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")
|
||||
REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")
|
||||
|
||||
# The version number is encoded as 0xMNNFFPPS: major minor fix patch status
|
||||
# The status gives if this is a developer or prerelease and is ignored here.
|
||||
|
|
|
@ -328,7 +328,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
|
|||
if (_pkg_check_modules_pkg_op)
|
||||
list(APPEND _pkg_check_modules_exist_query "${_pkg_check_modules_pkg_ver}")
|
||||
else()
|
||||
list(APPEND _pkg_check_modules_exist_query --exists)
|
||||
list(APPEND _pkg_check_modules_exist_query --exists --print-errors --short-errors)
|
||||
endif()
|
||||
|
||||
_pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_VERSION)
|
||||
|
@ -342,12 +342,14 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
|
|||
# execute the query
|
||||
execute_process(
|
||||
COMMAND ${PKG_CONFIG_EXECUTABLE} ${_pkg_check_modules_exist_query}
|
||||
RESULT_VARIABLE _pkgconfig_retval)
|
||||
RESULT_VARIABLE _pkgconfig_retval
|
||||
ERROR_VARIABLE _pkgconfig_error
|
||||
ERROR_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# evaluate result and tell failures
|
||||
if (_pkgconfig_retval)
|
||||
if(NOT ${_is_silent})
|
||||
message(STATUS " Package '${_pkg_check_modules_pkg}' not found")
|
||||
message(STATUS " ${_pkgconfig_error}")
|
||||
endif()
|
||||
|
||||
set(_pkg_check_modules_failed 1)
|
||||
|
|
|
@ -4,23 +4,42 @@
|
|||
#
|
||||
# Find the Apache Xerces-C++ validating XML parser headers and libraries.
|
||||
#
|
||||
# This module reports information about the Xerces installation in
|
||||
# several variables. General variables::
|
||||
# Imported targets
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# XercesC_FOUND - true if the Xerces headers and libraries were found
|
||||
# XercesC_VERSION - Xerces release version
|
||||
# XercesC_INCLUDE_DIRS - the directory containing the Xerces headers
|
||||
# XercesC_LIBRARIES - Xerces libraries to be linked
|
||||
# This module defines the following :prop_tgt:`IMPORTED` targets:
|
||||
#
|
||||
# The following cache variables may also be set::
|
||||
# ``XercesC::XercesC``
|
||||
# The Xerces-C++ ``xerces-c`` library, if found.
|
||||
#
|
||||
# XercesC_INCLUDE_DIR - the directory containing the Xerces headers
|
||||
# XercesC_LIBRARY - the Xerces library
|
||||
# Result variables
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This module will set the following variables in your project:
|
||||
#
|
||||
# ``XercesC_FOUND``
|
||||
# true if the Xerces headers and libraries were found
|
||||
# ``XercesC_VERSION``
|
||||
# Xerces release version
|
||||
# ``XercesC_INCLUDE_DIRS``
|
||||
# the directory containing the Xerces headers
|
||||
# ``XercesC_LIBRARIES``
|
||||
# Xerces libraries to be linked
|
||||
#
|
||||
# Cache variables
|
||||
# ^^^^^^^^^^^^^^^
|
||||
#
|
||||
# The following cache variables may also be set:
|
||||
#
|
||||
# ``XercesC_INCLUDE_DIR``
|
||||
# the directory containing the Xerces headers
|
||||
# ``XercesC_LIBRARY``
|
||||
# the Xerces library
|
||||
|
||||
# Written by Roger Leigh <rleigh@codelibre.net>
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2014 University of Dundee
|
||||
# Copyright 2014-2015 University of Dundee
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
|
@ -90,4 +109,32 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(XercesC
|
|||
if(XercesC_FOUND)
|
||||
set(XercesC_INCLUDE_DIRS "${XercesC_INCLUDE_DIR}")
|
||||
set(XercesC_LIBRARIES "${XercesC_LIBRARY}")
|
||||
|
||||
# For header-only libraries
|
||||
if(NOT TARGET XercesC::XercesC)
|
||||
add_library(XercesC::XercesC UNKNOWN IMPORTED)
|
||||
if(XercesC_INCLUDE_DIRS)
|
||||
set_target_properties(XercesC::XercesC PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${XercesC_INCLUDE_DIRS}")
|
||||
endif()
|
||||
if(EXISTS "${XercesC_LIBRARY}")
|
||||
set_target_properties(XercesC::XercesC PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${XercesC_LIBRARY}")
|
||||
endif()
|
||||
if(EXISTS "${XercesC_LIBRARY_DEBUG}")
|
||||
set_property(TARGET XercesC::XercesC APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(XercesC::XercesC PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
|
||||
IMPORTED_LOCATION_DEBUG "${XercesC_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
if(EXISTS "${XercesC_LIBRARY_RELEASE}")
|
||||
set_property(TARGET XercesC::XercesC APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(XercesC::XercesC PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
|
||||
IMPORTED_LOCATION_RELEASE "${XercesC_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -542,6 +542,8 @@ FunctionEnd
|
|||
; Define some macro setting for the gui
|
||||
@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@
|
||||
@CPACK_NSIS_INSTALLER_ICON_CODE@
|
||||
@CPACK_NSIS_INSTALLER_MUI_WELCOMEFINISH_CODE@
|
||||
@CPACK_NSIS_INSTALLER_MUI_UNWELCOMEFINISH_CODE@
|
||||
@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
|
||||
@CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@
|
||||
|
||||
|
|
|
@ -0,0 +1,112 @@
|
|||
# Compute Node Linux doesn't quite work the same as native Linux so all of this
|
||||
# needs to be custom. We use the variables defined through Cray's environment
|
||||
# modules to set up the right paths for things.
|
||||
|
||||
# Guard against multiple inclusions
|
||||
if(__CrayLinuxEnvironment)
|
||||
return()
|
||||
endif()
|
||||
set(__CrayLinuxEnvironment 1)
|
||||
|
||||
set(UNIX 1)
|
||||
|
||||
if(DEFINED ENV{CRAYOS_VERSION})
|
||||
set(CMAKE_SYSTEM_VERSION "$ENV{CRAYOS_VERSION}")
|
||||
elseif(DEFINED ENV{XTOS_VERSION})
|
||||
set(CMAKE_SYSTEM_VERSION "$ENV{XTOS_VERSION}")
|
||||
else()
|
||||
message(FATAL_ERROR "Neither the CRAYOS_VERSION or XTOS_VERSION environment variables are defined. This platform file should be used inside the Cray Linux Environment for targeting compute nodes (NIDs)")
|
||||
endif()
|
||||
message(STATUS "Cray Linux Environment ${CMAKE_SYSTEM_VERSION}")
|
||||
|
||||
# All cray systems are x86 CPUs and have been for quite some time
|
||||
# Note: this may need to change in the future with 64-bit ARM
|
||||
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
|
||||
|
||||
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
|
||||
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
|
||||
set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
|
||||
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
|
||||
|
||||
set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
|
||||
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
|
||||
|
||||
set(CMAKE_DL_LIBS dl)
|
||||
|
||||
# Note: Much of this is pulled from UnixPaths.cmake but adjusted to the Cray
|
||||
# environment accordingly
|
||||
|
||||
# Get the install directory of the running cmake to the search directories
|
||||
# CMAKE_ROOT is CMAKE_INSTALL_PREFIX/share/cmake, so we need to go two levels up
|
||||
get_filename_component(__cmake_install_dir "${CMAKE_ROOT}" PATH)
|
||||
get_filename_component(__cmake_install_dir "${__cmake_install_dir}" PATH)
|
||||
|
||||
|
||||
# Note: Some Cray's have the SYSROOT_DIR variable defined, pointing to a copy
|
||||
# of the NIDs userland. If so, then we'll use it. Otherwise, just assume
|
||||
# the userland from the login node is ok
|
||||
|
||||
# List common installation prefixes. These will be used for all
|
||||
# search types.
|
||||
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
|
||||
# Standard
|
||||
$ENV{SYSROOT_DIR}/usr/local $ENV{SYSROOT_DIR}/usr $ENV{SYSROOT_DIR}/
|
||||
|
||||
# CMake install location
|
||||
"${__cmake_install_dir}"
|
||||
)
|
||||
if (NOT CMAKE_FIND_NO_INSTALL_PREFIX)
|
||||
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
|
||||
# Project install destination.
|
||||
"${CMAKE_INSTALL_PREFIX}"
|
||||
)
|
||||
if(CMAKE_STAGING_PREFIX)
|
||||
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
|
||||
# User-supplied staging prefix.
|
||||
"${CMAKE_STAGING_PREFIX}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
|
||||
$ENV{SYSROOT_DIR}/usr/include
|
||||
$ENV{SYSROOT_DIR}/usr/include/X11
|
||||
)
|
||||
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
|
||||
$ENV{SYSROOT_DIR}/usr/local/lib64
|
||||
$ENV{SYSROOT_DIR}/usr/lib64
|
||||
$ENV{SYSROOT_DIR}/lib64
|
||||
)
|
||||
|
||||
list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
|
||||
$ENV{SYSROOT_DIR}/usr/local/lib64
|
||||
$ENV{SYSROOT_DIR}/usr/lib64
|
||||
$ENV{SYSROOT_DIR}/lib64
|
||||
)
|
||||
list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
$ENV{SYSROOT_DIR}/usr/include
|
||||
)
|
||||
list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
$ENV{SYSROOT_DIR}/usr/include
|
||||
)
|
||||
list(APPEND CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES
|
||||
$ENV{SYSROOT_DIR}/usr/include
|
||||
)
|
||||
|
||||
# Enable use of lib64 search path variants by default.
|
||||
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
|
||||
|
||||
# Check to see if we're using the cray compiler wrappers and load accordingly
|
||||
# if we are
|
||||
if(DEFINED ENV{CRAYPE_DIR})
|
||||
set(_CRAYPE_ROOT "$ENV{CRAYPE_DIR}")
|
||||
elseif(DEFINED ENV{ASYNCPE_DIR})
|
||||
set(_CRAYPE_ROOT "$ENV{ASYNCPE_DIR}")
|
||||
endif()
|
||||
if(_CRAYPE_ROOT AND
|
||||
((CMAKE_C_COMPILER MATCHES "${_CRAYPE_ROOT}") OR
|
||||
(CMAKE_CXX_COMPILER MATCHES "${_CRAYPE_ROOT}") OR
|
||||
(CMAKE_Fortran_COMPILER MATCHES "${_CRAYPE_ROOT}")))
|
||||
include(Platform/CrayPrgEnv)
|
||||
endif()
|
|
@ -0,0 +1,149 @@
|
|||
# Guard against multiple inclusions
|
||||
if(__CrayPrgEnv)
|
||||
return()
|
||||
endif()
|
||||
set(__CrayPrgEnv 1)
|
||||
if(DEFINED ENV{CRAYPE_VERSION})
|
||||
message(STATUS "Cray Programming Environment $ENV{CRAYPE_VERSION}")
|
||||
set(__verbose_flag "-craype-verbose")
|
||||
elseif(DEFINED ENV{ASYNCPE_VERSION})
|
||||
message(STATUS "Cray Programming Environment $ENV{ASYNCPE_VERSION}")
|
||||
set(__verbose_flag "-v")
|
||||
else()
|
||||
message(STATUS "Cray Programming Environment")
|
||||
endif()
|
||||
|
||||
if(NOT __CrayLinuxEnvironment)
|
||||
message(FATAL_ERROR "The CrayPrgEnv platform file must not be used on its own and is intented to be included by the CrayLinuxEnvironment platform file")
|
||||
endif()
|
||||
|
||||
# Flags for the Cray wrappers
|
||||
foreach(__lang C CXX Fortran)
|
||||
set(CMAKE_STATIC_LIBRARY_LINK_${__lang}_FLAGS "-static")
|
||||
set(CMAKE_SHARED_LIBRARY_${__lang}_FLAGS "")
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_${__lang}_FLAGS "-shared")
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_${__lang}_FLAGS "-dynamic")
|
||||
endforeach()
|
||||
|
||||
# If the link type is not explicitly specified in the environment then
|
||||
# the Cray wrappers assume that the code will be built staticly so
|
||||
# we check the following condition(s) are NOT met
|
||||
# Compiler flags are explicitly dynamic
|
||||
# Env var is dynamic and compiler flags are not explicitly static
|
||||
if(NOT (((CMAKE_C_FLAGS MATCHES "(^| )-dynamic($| )") OR
|
||||
(CMAKE_CXX_FLAGS MATCHES "(^| )-dynamic($| )") OR
|
||||
(CMAKE_Fortran_FLAGS MATCHES "(^| )-dynamic($| )") OR
|
||||
(CMAKE_EXE_LINKER_FLAGS MATCHES "(^| )-dynamic($| )"))
|
||||
OR
|
||||
(("$ENV{CRAYPE_LINK_TYPE}" STREQUAL "dynamic") AND
|
||||
NOT ((CMAKE_C_FLAGS MATCHES "(^| )-static($| )") OR
|
||||
(CMAKE_CXX_FLAGS MATCHES "(^| )-static($| )") OR
|
||||
(CMAKE_Fortran_FLAGS MATCHES "(^| )-static($| )") OR
|
||||
(CMAKE_EXE_LINKER_FLAGS MATCHES "(^| )-static($| )")))))
|
||||
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
|
||||
set(BUILD_SHARED_LIBS FALSE CACHE BOOL "")
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
set(CMAKE_LINK_SEARCH_START_STATIC TRUE)
|
||||
endif()
|
||||
|
||||
function(__cray_parse_flags_with_sep OUTPUT FLAG_TAG SEP INPUT)
|
||||
string(REGEX MATCHALL "${SEP}${FLAG_TAG}([^${SEP}]+)" FLAG_ARGS "${INPUT}")
|
||||
foreach(FLAG_ARG IN LISTS FLAG_ARGS)
|
||||
string(REGEX REPLACE
|
||||
"^${SEP}${FLAG_TAG}([^${SEP}]+)" "\\1" FLAG_VALUE
|
||||
"${FLAG_ARG}")
|
||||
list(APPEND ${OUTPUT} ${FLAG_VALUE})
|
||||
endforeach()
|
||||
set(${OUTPUT} ${${OUTPUT}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
macro(__cray_parse_flags OUTPUT FLAG_TAG INPUT)
|
||||
__cray_parse_flags_with_sep(${OUTPUT} ${FLAG_TAG} " " "${INPUT}")
|
||||
endmacro()
|
||||
|
||||
# Remove duplicates in a list
|
||||
macro(__cray_list_remove_duplicates VAR)
|
||||
if(${VAR})
|
||||
list(REMOVE_DUPLICATES ${VAR})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Compute the intersection of several lists
|
||||
function(__cray_list_intersect OUTPUT INPUT0)
|
||||
if(ARGC EQUAL 2)
|
||||
list(APPEND ${OUTPUT} ${${INPUT0}})
|
||||
else()
|
||||
foreach(I IN LISTS ${INPUT0})
|
||||
set(__is_common 1)
|
||||
foreach(L IN LISTS ARGN)
|
||||
list(FIND ${L} "${I}" __idx)
|
||||
if(__idx EQUAL -1)
|
||||
set(__is_common 0)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
if(__is_common)
|
||||
list(APPEND ${OUTPUT} "${I}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
set(${OUTPUT} ${${OUTPUT}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Parse the implicit directories used by the wrappers
|
||||
get_property(__langs GLOBAL PROPERTY ENABLED_LANGUAGES)
|
||||
foreach(__lang IN LISTS __langs)
|
||||
if(__lang STREQUAL "C")
|
||||
set(__empty empty.c)
|
||||
elseif(__lang STREQUAL CXX)
|
||||
set(__empty empty.cxx)
|
||||
elseif(__lang STREQUAL Fortran)
|
||||
set(__empty empty.f90)
|
||||
else()
|
||||
continue()
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_${__lang}_COMPILER} ${__verbose_flag} ${__empty}
|
||||
OUTPUT_VARIABLE __cmd_out
|
||||
ERROR_QUIET
|
||||
)
|
||||
string(REGEX MATCH "(^|\n)[^\n]*${__empty}[^\n]*" __driver "${__cmd_out}")
|
||||
|
||||
# Parse include paths
|
||||
set(__cray_flag_args)
|
||||
__cray_parse_flags(__cray_flag_args "-I" "${__driver}")
|
||||
__cray_parse_flags(__cray_flag_args "-isystem " "${__driver}")
|
||||
list(APPEND CMAKE_${__lang}_IMPLICIT_INCLUDE_DIRECTORIES ${__cray_flag_args})
|
||||
__cray_list_remove_duplicates(CMAKE_${__lang}_IMPLICIT_INCLUDE_DIRECTORIES)
|
||||
|
||||
# Parse library paths
|
||||
set(__cray_flag_args)
|
||||
__cray_parse_flags(__cray_flag_args "-L" "${__driver}")
|
||||
list(APPEND CMAKE_${__lang}_IMPLICIT_LINK_DIRECTORIES ${__cray_flag_args})
|
||||
__cray_list_remove_duplicates(CMAKE_${__lang}_IMPLICIT_LINK_DIRECTORIES)
|
||||
|
||||
# Parse libraries
|
||||
set(__cray_flag_args)
|
||||
__cray_parse_flags(__cray_flag_args "-l" "${__driver}")
|
||||
__cray_parse_flags(__cray_linker_flags "-Wl" "${__driver}")
|
||||
foreach(F IN LISTS __cray_linker_flags)
|
||||
__cray_parse_flags_with_sep(__cray_flag_args "-l" "," "${F}")
|
||||
endforeach()
|
||||
list(APPEND CMAKE_${__lang}_IMPLICIT_LINK_LIBRARIES ${__cray_flag_args})
|
||||
__cray_list_remove_duplicates(CMAKE_${__lang}_IMPLICIT_LINK_LIBRARIES)
|
||||
endforeach()
|
||||
|
||||
# Determine the common directories between all languages and add them
|
||||
# as system search paths
|
||||
set(__cray_inc_path_vars)
|
||||
set(__cray_lib_path_vars)
|
||||
foreach(__lang IN LISTS __langs)
|
||||
list(APPEND __cray_inc_path_vars CMAKE_${__lang}_IMPLICIT_INCLUDE_DIRECTORIES)
|
||||
list(APPEND __cray_lib_path_vars CMAKE_${__lang}_IMPLICIT_LINK_DIRECTORIES)
|
||||
endforeach()
|
||||
if(__cray_inc_path_vars)
|
||||
__cray_list_intersect(CMAKE_SYSTEM_INCLUDE_PATH ${__cray_inc_path_vars})
|
||||
endif()
|
||||
if(__cray_lib_path_vars)
|
||||
__cray_list_intersect(CMAKE_SYSTEM_LIBRARY_PATH ${__cray_lib_path_vars})
|
||||
endif()
|
|
@ -9,12 +9,6 @@ endif()
|
|||
|
||||
include(Platform/UnixPaths)
|
||||
|
||||
# Add the compiler's implicit link directories.
|
||||
if("${CMAKE_C_COMPILER_ID} ${CMAKE_CXX_COMPILER_ID}" MATCHES SunPro)
|
||||
list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
|
||||
/opt/SUNWspro/lib /opt/SUNWspro/prod/lib /usr/ccs/lib)
|
||||
endif()
|
||||
|
||||
# The Sun linker needs to find transitive shared library dependencies
|
||||
# in the -L path.
|
||||
set(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
|
||||
|
|
|
@ -302,6 +302,7 @@ macro(__windows_compiler_msvc lang)
|
|||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
|
||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
|
||||
set(CMAKE_${lang}_LINKER_SUPPORTS_PDB ON)
|
||||
set(CMAKE_NINJA_DEPTYPE_${lang} msvc)
|
||||
|
||||
if(NOT CMAKE_RC_COMPILER_INIT)
|
||||
set(CMAKE_RC_COMPILER_INIT rc)
|
||||
|
@ -311,4 +312,5 @@ macro(__windows_compiler_msvc lang)
|
|||
endif()
|
||||
|
||||
enable_language(RC)
|
||||
set(CMAKE_NINJA_CMCLDEPS_RC 1)
|
||||
endmacro()
|
||||
|
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue