mirror of
https://github.com/openharmony/third_party_cmake.git
synced 2026-07-21 00:05:24 -04:00
Merge tag 'v3.19.2' into backport-3.19-rel-file-table
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
paths:
|
||||
# Any packages made.
|
||||
- build/cmake-*-Linux-x86_64.*
|
||||
- build/cmake-*-Darwin-x86_64.*
|
||||
- build/cmake-*-macos-universal.*
|
||||
# Any source packages made.
|
||||
- build/cmake-*.tar.gz
|
||||
- build/cmake-*.zip
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
$erroractionpreference = "stop"
|
||||
|
||||
$version = "3.18.4"
|
||||
$sha256sum = "A932BC0C8EE79F1003204466C525B38A840424D4AE29F9E5FB88959116F2407D"
|
||||
$version = "3.19.0"
|
||||
$sha256sum = "67BBDA67C98C5F0789199FE1DB650F12274A6AD40FD8CAE88D208029AC618905"
|
||||
$filename = "cmake-$version-win64-x64"
|
||||
$tarball = "$filename.zip"
|
||||
|
||||
|
||||
+3
-3
@@ -2,17 +2,17 @@
|
||||
|
||||
set -e
|
||||
|
||||
readonly version="3.18.4"
|
||||
readonly version="3.19.0"
|
||||
|
||||
case "$( uname -s )" in
|
||||
Linux)
|
||||
shatool="sha256sum"
|
||||
sha256sum="149e0cee002e59e0bb84543cf3cb099f108c08390392605e944daeb6594cbc29"
|
||||
sha256sum="5446cdee900e906e46162a5a7be9b4542bb5e886041cf8cffeda62aae2696ccf"
|
||||
platform="Linux"
|
||||
;;
|
||||
Darwin)
|
||||
shatool="shasum -a 256"
|
||||
sha256sum="9d27049660474cf134ab46fa0e0db771b263313fcb8ba82ee8b2d1a1a62f8f20"
|
||||
sha256sum="315eb5500753f797075b6ea43189420e97b0b9f32c8fc87ec94ba1d80b72eb7f"
|
||||
platform="Darwin"
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -10,4 +10,6 @@ if (NOT "$ENV{CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||
set(CMAKE_BUILD_TYPE "$ENV{CMAKE_BUILD_TYPE}" CACHE STRING "")
|
||||
endif ()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/configure_sccache.cmake")
|
||||
if (NOT configure_no_sccache)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/configure_sccache.cmake")
|
||||
endif()
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
# detect that Java is available and working, but a test machine then not have a
|
||||
# working Java installed. To work around this, just act as if Java is not
|
||||
# available on any CI machine.
|
||||
set(Java_JAVA_EXECUTABLE "" CACHE FILEPATH "")
|
||||
set(Java_JAVAC_EXECUTABLE "" CACHE FILEPATH "")
|
||||
set(Java_JAR_EXECUTABLE "" CACHE FILEPATH "")
|
||||
set(CMake_TEST_Java 0 CACHE FILEPATH "")
|
||||
|
||||
# Qt binaries get placed inside the source directory, which causes them to not
|
||||
# be included in the install-time rpath, but we still want them in the
|
||||
@@ -13,3 +11,8 @@ set(Java_JAR_EXECUTABLE "" CACHE FILEPATH "")
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH OFF CACHE BOOL "")
|
||||
|
||||
set(BUILD_QtDialog ON CACHE BOOL "")
|
||||
|
||||
# The "XCTest" test uses an explicit deployment target chosen
|
||||
# when CMake itself is configured. Use a version that is not
|
||||
# newer than the macOS version running on any CI host.
|
||||
set(CMake_TEST_XCTest_DEPLOYMENT_TARGET "10.15" CACHE STRING "")
|
||||
|
||||
@@ -9,10 +9,10 @@ set(CPACK_DMG_FORMAT "UDBZ" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS "-stdlib=libc++" CACHE STRING "")
|
||||
set(CMAKE_C_STANDARD "11" CACHE STRING "")
|
||||
set(CMAKE_CXX_STANDARD "14" CACHE STRING "")
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.7" CACHE STRING "")
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10" CACHE STRING "")
|
||||
set(CMAKE_SKIP_BOOTSTRAP_TEST "TRUE" CACHE STRING "")
|
||||
set(CPACK_SYSTEM_NAME "Darwin-x86_64" CACHE STRING "")
|
||||
set(CPACK_SYSTEM_NAME "macos-universal" CACHE STRING "")
|
||||
set(BUILD_CursesDialog "ON" CACHE BOOL "")
|
||||
set(BUILD_QtDialog "TRUE" CACHE BOOL "")
|
||||
set(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL "3" CACHE STRING "")
|
||||
@@ -20,5 +20,9 @@ set(CMake_INSTALL_DEPENDENCIES "ON" CACHE BOOL "")
|
||||
set(CMAKE_SKIP_RPATH "TRUE" CACHE BOOL "")
|
||||
set(CMake_TEST_NO_FindPackageModeMakefileTest "TRUE" CACHE BOOL "")
|
||||
|
||||
# XXX(sccache): restore sccache when it works for multiple architectures:
|
||||
# https://github.com/mozilla/sccache/issues/847
|
||||
set(configure_no_sccache 1)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_common.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake")
|
||||
|
||||
@@ -50,8 +50,8 @@ if (qt_platform STREQUAL "windows_x86")
|
||||
elseif (qt_platform STREQUAL "mac_x64")
|
||||
if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "package")
|
||||
list(APPEND qt_files
|
||||
"qt-5.6.2-macosx10.7-x86_64.tar.xz")
|
||||
set(qt_subdir "qt-5.6.2-macosx10.7-x86_64")
|
||||
"qt-5.9.9-macosx10.10-x86_64-arm64.tar.xz")
|
||||
set(qt_subdir "qt-5.9.9-macosx10.10-x86_64-arm64")
|
||||
else ()
|
||||
set(qt_build_stamp "202009071110")
|
||||
set(qt_file_name_prefix "${qt_version}-0-${qt_build_stamp}")
|
||||
|
||||
@@ -10,4 +10,4 @@ set("5.15.1-0-202009071110qtwinextras-Windows-Windows_10-MSVC2015-Windows-Window
|
||||
|
||||
set("5.15.1-0-202009071110qtbase-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64.7z_hash" df2813ce7c6cb4287abd7956cd1cb9d08312e4ac1208b6cb57af4df11b8ebba1)
|
||||
|
||||
set("qt-5.6.2-macosx10.7-x86_64.tar.xz_hash" 2b60373ea60037ce356d4c9f5a8c1df9854127a2c55118252e1a2f5a5f4e0010)
|
||||
set("qt-5.9.9-macosx10.10-x86_64-arm64.tar.xz_hash" d4449771afa0bc6a809c14f1e6d939e7732494cf059503ae451e2bfe8fc60cc1)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
$erroractionpreference = "stop"
|
||||
|
||||
$version = "1.10.0"
|
||||
$sha256sum = "919FD158C16BF135E8A850BB4046EC1CE28A7439EE08B977CD0B7F6B3463D178"
|
||||
$version = "1.10.2"
|
||||
$sha256sum = "BBDE850D247D2737C5764C927D1071CBB1F1957DCABDA4A130FA8547C12C695F"
|
||||
$filename = "ninja-win"
|
||||
$tarball = "$filename.zip"
|
||||
|
||||
|
||||
+3
-3
@@ -2,17 +2,17 @@
|
||||
|
||||
set -e
|
||||
|
||||
readonly version="1.10.0"
|
||||
readonly version="1.10.2"
|
||||
|
||||
case "$( uname -s )" in
|
||||
Linux)
|
||||
shatool="sha256sum"
|
||||
sha256sum="6566836ddf3d72ca06685b34814e0c6fa0f0943542d651d0dab3150f10307c82"
|
||||
sha256sum="763464859c7ef2ea3a0a10f4df40d2025d3bb9438fcb1228404640410c0ec22d"
|
||||
platform="linux"
|
||||
;;
|
||||
Darwin)
|
||||
shatool="shasum -a 256"
|
||||
sha256sum="2ee405c0e205d55666c60cc9c0d8d04c8ede06d3ef2e2c2aabe08fd81c17d22e"
|
||||
sha256sum="6fa359f491fac7e5185273c6421a000eea6a2f0febf0ac03ac900bd4d80ed2a5"
|
||||
platform="mac"
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci ext/$CI_CONCURRENT_ID"
|
||||
# TODO: Factor this out so that each job selects the Xcode version to
|
||||
# use so that different versions can be tested in a single pipeline.
|
||||
DEVELOPER_DIR: "/Applications/Xcode-11.7.app/Contents/Developer"
|
||||
DEVELOPER_DIR: "/Applications/Xcode-12.2.app/Contents/Developer"
|
||||
# Avoid conflicting with other projects running on the same machine.
|
||||
SCCACHE_SERVER_PORT: 4227
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
- cmake # Since this is a bare runner, pin to a project.
|
||||
- macos
|
||||
- shell
|
||||
- xcode-11.7
|
||||
- xcode-12.2
|
||||
- nonconcurrent
|
||||
|
||||
.macos_builder_tags_package:
|
||||
@@ -71,7 +71,7 @@
|
||||
- cmake # Since this is a bare runner, pin to a project.
|
||||
- macos
|
||||
- shell
|
||||
- xcode-11.7
|
||||
- xcode-12.2
|
||||
- nonconcurrent
|
||||
- finder
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
- cmake # Since this is a bare runner, pin to a project.
|
||||
- macos
|
||||
- shell
|
||||
- xcode-11.7
|
||||
- xcode-12.2
|
||||
- concurrent
|
||||
|
||||
## macOS-specific scripts
|
||||
@@ -115,13 +115,8 @@
|
||||
|
||||
script:
|
||||
- *before_script_macos
|
||||
- .gitlab/ci/sccache.sh
|
||||
# Allow the server to already be running.
|
||||
- "sccache --start-server || :"
|
||||
- sccache --show-stats
|
||||
- ctest -VV -S .gitlab/ci/ctest_configure.cmake
|
||||
- ctest -VV -S .gitlab/ci/ctest_build.cmake
|
||||
- sccache --show-stats
|
||||
- cd build
|
||||
- cpack -G TGZ
|
||||
- cpack -G DragNDrop
|
||||
|
||||
@@ -150,7 +150,12 @@ The currently scheduled list of deferred calls may be retrieved:
|
||||
cmake_language(DEFER [DIRECTORY <dir>] GET_CALL_IDS <var>)
|
||||
|
||||
This will store in ``<var>`` a :ref:`semicolon-separated list <CMake Language
|
||||
Lists>` of deferred call ids.
|
||||
Lists>` of deferred call ids. The ids are for the directory scope in which
|
||||
the calls have been deferred to (i.e. where they will be executed), which can
|
||||
be different to the scope in which they were created. The ``DIRECTORY``
|
||||
option can be used to specify the scope for which to retrieve the call ids.
|
||||
If that option is not given, the call ids for the current directory scope will
|
||||
be returned.
|
||||
|
||||
Details of a specific call may be retrieved from its id:
|
||||
|
||||
@@ -163,8 +168,9 @@ Lists>` in which the first element is the name of the command to be
|
||||
called, and the remaining elements are its unevaluated arguments (any
|
||||
contained ``;`` characters are included literally and cannot be distinguished
|
||||
from multiple arguments). If multiple calls are scheduled with the same id,
|
||||
this retrieves the first one. If no call is scheduled with the given id,
|
||||
this stores an empty string in the variable.
|
||||
this retrieves the first one. If no call is scheduled with the given id in
|
||||
the specified ``DIRECTORY`` scope (or the current directory scope if no
|
||||
``DIRECTORY`` option is given), this stores an empty string in the variable.
|
||||
|
||||
Deferred calls may be canceled by their id:
|
||||
|
||||
@@ -172,8 +178,9 @@ Deferred calls may be canceled by their id:
|
||||
|
||||
cmake_language(DEFER [DIRECTORY <dir>] CANCEL_CALL <id>...)
|
||||
|
||||
This cancels all deferred calls matching any of the given ids.
|
||||
Unknown ids are silently ignored.
|
||||
This cancels all deferred calls matching any of the given ids in the specified
|
||||
``DIRECTORY`` scope (or the current directory scope if no ``DIRECTORY`` option
|
||||
is given). Unknown ids are silently ignored.
|
||||
|
||||
Deferred Call Examples
|
||||
""""""""""""""""""""""
|
||||
|
||||
@@ -22,6 +22,9 @@ dots will be seen as version component separators, resulting in the
|
||||
``...<max>`` part being ignored and preserving the pre-3.12 behavior
|
||||
of basing policies on ``<min>``.
|
||||
|
||||
This command will set the value of the
|
||||
:variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable to ``<min>``.
|
||||
|
||||
The ``FATAL_ERROR`` option is accepted but ignored by CMake 2.6 and
|
||||
higher. It should be specified so CMake versions 2.4 and lower fail
|
||||
with an error instead of just a warning.
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
CMAKE_APPLE_SILICON_PROCESSOR
|
||||
-----------------------------
|
||||
|
||||
.. versionadded:: 3.19.2
|
||||
|
||||
.. include:: ENV_VAR.txt
|
||||
|
||||
On Apple Silicon hosts running macOS, set this environment variable to tell
|
||||
CMake what architecture to use for :variable:`CMAKE_HOST_SYSTEM_PROCESSOR`.
|
||||
The value must be either ``arm64`` or ``x86_64``.
|
||||
|
||||
The :variable:`CMAKE_APPLE_SILICON_PROCESSOR` normal variable, if set,
|
||||
overrides this environment variable.
|
||||
@@ -28,6 +28,7 @@ Environment Variables that Control the Build
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
/envvar/CMAKE_APPLE_SILICON_PROCESSOR
|
||||
/envvar/CMAKE_BUILD_PARALLEL_LEVEL
|
||||
/envvar/CMAKE_CONFIG_TYPE
|
||||
/envvar/CMAKE_EXPORT_COMPILE_COMMANDS
|
||||
|
||||
@@ -648,6 +648,9 @@ which is just the string ``tgt``.
|
||||
expression is evaluated on.
|
||||
``$<TARGET_FILE_NAME:tgt>``
|
||||
The ``tgt`` filename.
|
||||
|
||||
Note that ``tgt`` is not added as a dependency of the target this
|
||||
expression is evaluated on (see policy :policy:`CMP0112`).
|
||||
``$<TARGET_FILE_DIR:tgt>``
|
||||
Directory of the ``tgt`` binary file.
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ These modules are loaded using the :command:`include` command.
|
||||
/module/AndroidTestUtilities
|
||||
/module/BundleUtilities
|
||||
/module/CheckCCompilerFlag
|
||||
/module/CheckCompilerFlag
|
||||
/module/CheckCSourceCompiles
|
||||
/module/CheckCSourceRuns
|
||||
/module/CheckCXXCompilerFlag
|
||||
@@ -30,10 +31,10 @@ These modules are loaded using the :command:`include` command.
|
||||
/module/CheckFortranSourceCompiles
|
||||
/module/CheckFortranSourceRuns
|
||||
/module/CheckFunctionExists
|
||||
/module/CheckIPOSupported
|
||||
/module/CheckIncludeFileCXX
|
||||
/module/CheckIncludeFile
|
||||
/module/CheckIncludeFiles
|
||||
/module/CheckIPOSupported
|
||||
/module/CheckLanguage
|
||||
/module/CheckLibraryExists
|
||||
/module/CheckLinkerFlag
|
||||
@@ -45,7 +46,6 @@ These modules are loaded using the :command:`include` command.
|
||||
/module/CheckOBJCXXSourceRuns
|
||||
/module/CheckPIESupported
|
||||
/module/CheckPrototypeDefinition
|
||||
/module/CheckCompilerFlag
|
||||
/module/CheckSourceCompiles
|
||||
/module/CheckSourceRuns
|
||||
/module/CheckStructHasMember
|
||||
@@ -64,10 +64,10 @@ These modules are loaded using the :command:`include` command.
|
||||
/module/CMakePrintSystemInformation
|
||||
/module/CMakePushCheckState
|
||||
/module/CMakeVerifyManifest
|
||||
/module/CPack
|
||||
/module/CPackComponent
|
||||
/module/CPackIFW
|
||||
/module/CPackIFWConfigureFile
|
||||
/module/CPack
|
||||
/module/CSharpUtilities
|
||||
/module/CTest
|
||||
/module/CTestCoverageCollectGCOV
|
||||
@@ -97,8 +97,8 @@ These modules are loaded using the :command:`include` command.
|
||||
/module/TestForSSTREAM
|
||||
/module/TestForSTDNamespace
|
||||
/module/UseEcos
|
||||
/module/UseJavaClassFilelist
|
||||
/module/UseJava
|
||||
/module/UseJavaClassFilelist
|
||||
/module/UseJavaSymlinks
|
||||
/module/UseSWIG
|
||||
/module/UsewxWidgets
|
||||
@@ -117,16 +117,16 @@ They are normally called through the :command:`find_package` command.
|
||||
/module/FindArmadillo
|
||||
/module/FindASPELL
|
||||
/module/FindAVIFile
|
||||
/module/FindBacktrace
|
||||
/module/FindBISON
|
||||
/module/FindBLAS
|
||||
/module/FindBacktrace
|
||||
/module/FindBoost
|
||||
/module/FindBullet
|
||||
/module/FindBZip2
|
||||
/module/FindCABLE
|
||||
/module/FindCoin3D
|
||||
/module/FindCups
|
||||
/module/FindCUDAToolkit
|
||||
/module/FindCups
|
||||
/module/FindCURL
|
||||
/module/FindCurses
|
||||
/module/FindCVS
|
||||
@@ -139,8 +139,8 @@ They are normally called through the :command:`find_package` command.
|
||||
/module/FindEnvModules
|
||||
/module/FindEXPAT
|
||||
/module/FindFLEX
|
||||
/module/FindFLTK2
|
||||
/module/FindFLTK
|
||||
/module/FindFLTK2
|
||||
/module/FindFontconfig
|
||||
/module/FindFreetype
|
||||
/module/FindGCCXML
|
||||
@@ -154,17 +154,17 @@ They are normally called through the :command:`find_package` command.
|
||||
/module/FindGnuTLS
|
||||
/module/FindGSL
|
||||
/module/FindGTest
|
||||
/module/FindGTK2
|
||||
/module/FindGTK
|
||||
/module/FindGTK2
|
||||
/module/FindHDF5
|
||||
/module/FindHg
|
||||
/module/FindHSPELL
|
||||
/module/FindHTMLHelp
|
||||
/module/FindIce
|
||||
/module/FindIconv
|
||||
/module/FindIcotool
|
||||
/module/FindICU
|
||||
/module/FindImageMagick
|
||||
/module/FindIconv
|
||||
/module/FindIntl
|
||||
/module/FindITK
|
||||
/module/FindJasper
|
||||
@@ -181,14 +181,14 @@ They are normally called through the :command:`find_package` command.
|
||||
/module/FindLibXml2
|
||||
/module/FindLibXslt
|
||||
/module/FindLTTngUST
|
||||
/module/FindLua
|
||||
/module/FindLua50
|
||||
/module/FindLua51
|
||||
/module/FindLua
|
||||
/module/FindMatlab
|
||||
/module/FindMFC
|
||||
/module/FindMotif
|
||||
/module/FindMPEG2
|
||||
/module/FindMPEG
|
||||
/module/FindMPEG2
|
||||
/module/FindMPI
|
||||
/module/FindODBC
|
||||
/module/FindOpenACC
|
||||
@@ -199,9 +199,10 @@ They are normally called through the :command:`find_package` command.
|
||||
/module/FindOpenSceneGraph
|
||||
/module/FindOpenSSL
|
||||
/module/FindOpenThreads
|
||||
/module/Findosg
|
||||
/module/Findosg_functions
|
||||
/module/FindosgAnimation
|
||||
/module/FindosgDB
|
||||
/module/Findosg_functions
|
||||
/module/FindosgFX
|
||||
/module/FindosgGA
|
||||
/module/FindosgIntrospection
|
||||
@@ -210,7 +211,6 @@ They are normally called through the :command:`find_package` command.
|
||||
/module/FindosgPresentation
|
||||
/module/FindosgProducer
|
||||
/module/FindosgQt
|
||||
/module/Findosg
|
||||
/module/FindosgShadow
|
||||
/module/FindosgSim
|
||||
/module/FindosgTerrain
|
||||
@@ -220,8 +220,8 @@ They are normally called through the :command:`find_package` command.
|
||||
/module/FindosgVolume
|
||||
/module/FindosgWidget
|
||||
/module/FindPatch
|
||||
/module/FindPerlLibs
|
||||
/module/FindPerl
|
||||
/module/FindPerlLibs
|
||||
/module/FindPHP4
|
||||
/module/FindPhysFS
|
||||
/module/FindPike
|
||||
@@ -238,10 +238,10 @@ They are normally called through the :command:`find_package` command.
|
||||
/module/FindQuickTime
|
||||
/module/FindRTI
|
||||
/module/FindRuby
|
||||
/module/FindSDL
|
||||
/module/FindSDL_image
|
||||
/module/FindSDL_mixer
|
||||
/module/FindSDL_net
|
||||
/module/FindSDL
|
||||
/module/FindSDL_sound
|
||||
/module/FindSDL_ttf
|
||||
/module/FindSelfPackers
|
||||
@@ -260,10 +260,10 @@ They are normally called through the :command:`find_package` command.
|
||||
/module/FindWget
|
||||
/module/FindWish
|
||||
/module/FindwxWidgets
|
||||
/module/FindXCTest
|
||||
/module/FindXalanC
|
||||
/module/FindXercesC
|
||||
/module/FindX11
|
||||
/module/FindXalanC
|
||||
/module/FindXCTest
|
||||
/module/FindXercesC
|
||||
/module/FindXMLRPC
|
||||
/module/FindZLIB
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ Format
|
||||
An optional array of strings representing the names of presets to inherit
|
||||
from. The preset will inherit all of the fields from the ``inherits``
|
||||
presets by default (except ``name``, ``hidden``, ``inherits``,
|
||||
``description``, and ``longDescription``), but can override them as
|
||||
``description``, and ``displayName``), but can override them as
|
||||
desired. If multiple ``inherits`` presets provide conflicting values for
|
||||
the same field, the earlier preset in the ``inherits`` list will be
|
||||
preferred. Presets in ``CMakePresets.json`` may not inherit from presets
|
||||
|
||||
@@ -75,8 +75,8 @@ Properties on Directories
|
||||
/prop_dir/IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
|
||||
/prop_dir/INCLUDE_DIRECTORIES
|
||||
/prop_dir/INCLUDE_REGULAR_EXPRESSION
|
||||
/prop_dir/INTERPROCEDURAL_OPTIMIZATION_CONFIG
|
||||
/prop_dir/INTERPROCEDURAL_OPTIMIZATION
|
||||
/prop_dir/INTERPROCEDURAL_OPTIMIZATION_CONFIG
|
||||
/prop_dir/LABELS
|
||||
/prop_dir/LINK_DIRECTORIES
|
||||
/prop_dir/LINK_OPTIONS
|
||||
@@ -124,10 +124,10 @@ Properties on Targets
|
||||
/prop_tgt/ANDROID_SECURE_PROPS_PATH
|
||||
/prop_tgt/ANDROID_SKIP_ANT_STEP
|
||||
/prop_tgt/ANDROID_STL_TYPE
|
||||
/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY_CONFIG
|
||||
/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY
|
||||
/prop_tgt/ARCHIVE_OUTPUT_NAME_CONFIG
|
||||
/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY_CONFIG
|
||||
/prop_tgt/ARCHIVE_OUTPUT_NAME
|
||||
/prop_tgt/ARCHIVE_OUTPUT_NAME_CONFIG
|
||||
/prop_tgt/AUTOGEN_BUILD_DIR
|
||||
/prop_tgt/AUTOGEN_ORIGIN_DEPENDS
|
||||
/prop_tgt/AUTOGEN_PARALLEL
|
||||
@@ -151,8 +151,8 @@ Properties on Targets
|
||||
/prop_tgt/BUILD_RPATH_USE_ORIGIN
|
||||
/prop_tgt/BUILD_WITH_INSTALL_NAME_DIR
|
||||
/prop_tgt/BUILD_WITH_INSTALL_RPATH
|
||||
/prop_tgt/BUNDLE_EXTENSION
|
||||
/prop_tgt/BUNDLE
|
||||
/prop_tgt/BUNDLE_EXTENSION
|
||||
/prop_tgt/C_EXTENSIONS
|
||||
/prop_tgt/C_STANDARD
|
||||
/prop_tgt/C_STANDARD_REQUIRED
|
||||
@@ -173,11 +173,11 @@ Properties on Targets
|
||||
/prop_tgt/CONFIG_POSTFIX
|
||||
/prop_tgt/CROSSCOMPILING_EMULATOR
|
||||
/prop_tgt/CUDA_ARCHITECTURES
|
||||
/prop_tgt/CUDA_EXTENSIONS
|
||||
/prop_tgt/CUDA_PTX_COMPILATION
|
||||
/prop_tgt/CUDA_SEPARABLE_COMPILATION
|
||||
/prop_tgt/CUDA_RESOLVE_DEVICE_SYMBOLS
|
||||
/prop_tgt/CUDA_RUNTIME_LIBRARY
|
||||
/prop_tgt/CUDA_EXTENSIONS
|
||||
/prop_tgt/CUDA_SEPARABLE_COMPILATION
|
||||
/prop_tgt/CUDA_STANDARD
|
||||
/prop_tgt/CUDA_STANDARD_REQUIRED
|
||||
/prop_tgt/CXX_EXTENSIONS
|
||||
@@ -185,8 +185,8 @@ Properties on Targets
|
||||
/prop_tgt/CXX_STANDARD_REQUIRED
|
||||
/prop_tgt/DEBUG_POSTFIX
|
||||
/prop_tgt/DEFINE_SYMBOL
|
||||
/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY
|
||||
/prop_tgt/DEPLOYMENT_ADDITIONAL_FILES
|
||||
/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY
|
||||
/prop_tgt/DEPRECATION
|
||||
/prop_tgt/DISABLE_PRECOMPILE_HEADERS
|
||||
/prop_tgt/DOTNET_TARGET_FRAMEWORK
|
||||
@@ -194,8 +194,8 @@ Properties on Targets
|
||||
/prop_tgt/EchoString
|
||||
/prop_tgt/ENABLE_EXPORTS
|
||||
/prop_tgt/EXCLUDE_FROM_ALL
|
||||
/prop_tgt/EXCLUDE_FROM_DEFAULT_BUILD_CONFIG
|
||||
/prop_tgt/EXCLUDE_FROM_DEFAULT_BUILD
|
||||
/prop_tgt/EXCLUDE_FROM_DEFAULT_BUILD_CONFIG
|
||||
/prop_tgt/EXPORT_NAME
|
||||
/prop_tgt/EXPORT_PROPERTIES
|
||||
/prop_tgt/FOLDER
|
||||
@@ -211,30 +211,30 @@ Properties on Targets
|
||||
/prop_tgt/GNUtoMS
|
||||
/prop_tgt/HAS_CXX
|
||||
/prop_tgt/IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
|
||||
/prop_tgt/IMPORTED
|
||||
/prop_tgt/IMPORTED_COMMON_LANGUAGE_RUNTIME
|
||||
/prop_tgt/IMPORTED_CONFIGURATIONS
|
||||
/prop_tgt/IMPORTED_GLOBAL
|
||||
/prop_tgt/IMPORTED_IMPLIB_CONFIG
|
||||
/prop_tgt/IMPORTED_IMPLIB
|
||||
/prop_tgt/IMPORTED_LIBNAME_CONFIG
|
||||
/prop_tgt/IMPORTED_IMPLIB_CONFIG
|
||||
/prop_tgt/IMPORTED_LIBNAME
|
||||
/prop_tgt/IMPORTED_LINK_DEPENDENT_LIBRARIES_CONFIG
|
||||
/prop_tgt/IMPORTED_LIBNAME_CONFIG
|
||||
/prop_tgt/IMPORTED_LINK_DEPENDENT_LIBRARIES
|
||||
/prop_tgt/IMPORTED_LINK_INTERFACE_LANGUAGES_CONFIG
|
||||
/prop_tgt/IMPORTED_LINK_DEPENDENT_LIBRARIES_CONFIG
|
||||
/prop_tgt/IMPORTED_LINK_INTERFACE_LANGUAGES
|
||||
/prop_tgt/IMPORTED_LINK_INTERFACE_LIBRARIES_CONFIG
|
||||
/prop_tgt/IMPORTED_LINK_INTERFACE_LANGUAGES_CONFIG
|
||||
/prop_tgt/IMPORTED_LINK_INTERFACE_LIBRARIES
|
||||
/prop_tgt/IMPORTED_LINK_INTERFACE_MULTIPLICITY_CONFIG
|
||||
/prop_tgt/IMPORTED_LINK_INTERFACE_LIBRARIES_CONFIG
|
||||
/prop_tgt/IMPORTED_LINK_INTERFACE_MULTIPLICITY
|
||||
/prop_tgt/IMPORTED_LOCATION_CONFIG
|
||||
/prop_tgt/IMPORTED_LINK_INTERFACE_MULTIPLICITY_CONFIG
|
||||
/prop_tgt/IMPORTED_LOCATION
|
||||
/prop_tgt/IMPORTED_NO_SONAME_CONFIG
|
||||
/prop_tgt/IMPORTED_LOCATION_CONFIG
|
||||
/prop_tgt/IMPORTED_NO_SONAME
|
||||
/prop_tgt/IMPORTED_OBJECTS_CONFIG
|
||||
/prop_tgt/IMPORTED_NO_SONAME_CONFIG
|
||||
/prop_tgt/IMPORTED_OBJECTS
|
||||
/prop_tgt/IMPORTED
|
||||
/prop_tgt/IMPORTED_SONAME_CONFIG
|
||||
/prop_tgt/IMPORTED_OBJECTS_CONFIG
|
||||
/prop_tgt/IMPORTED_SONAME
|
||||
/prop_tgt/IMPORTED_SONAME_CONFIG
|
||||
/prop_tgt/IMPORT_PREFIX
|
||||
/prop_tgt/IMPORT_SUFFIX
|
||||
/prop_tgt/INCLUDE_DIRECTORIES
|
||||
@@ -251,14 +251,15 @@ Properties on Targets
|
||||
/prop_tgt/INTERFACE_LINK_DIRECTORIES
|
||||
/prop_tgt/INTERFACE_LINK_LIBRARIES
|
||||
/prop_tgt/INTERFACE_LINK_OPTIONS
|
||||
/prop_tgt/INTERFACE_PRECOMPILE_HEADERS
|
||||
/prop_tgt/INTERFACE_POSITION_INDEPENDENT_CODE
|
||||
/prop_tgt/INTERFACE_PRECOMPILE_HEADERS
|
||||
/prop_tgt/INTERFACE_SOURCES
|
||||
/prop_tgt/INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
|
||||
/prop_tgt/INTERPROCEDURAL_OPTIMIZATION_CONFIG
|
||||
/prop_tgt/INTERPROCEDURAL_OPTIMIZATION
|
||||
/prop_tgt/INTERPROCEDURAL_OPTIMIZATION_CONFIG
|
||||
/prop_tgt/IOS_INSTALL_COMBINED
|
||||
/prop_tgt/ISPC_HEADER_DIRECTORY
|
||||
/prop_tgt/ISPC_HEADER_SUFFIX
|
||||
/prop_tgt/ISPC_INSTRUCTION_SETS
|
||||
/prop_tgt/JOB_POOL_COMPILE
|
||||
/prop_tgt/JOB_POOL_LINK
|
||||
@@ -270,31 +271,31 @@ Properties on Targets
|
||||
/prop_tgt/LANG_CPPLINT
|
||||
/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE
|
||||
/prop_tgt/LANG_VISIBILITY_PRESET
|
||||
/prop_tgt/LIBRARY_OUTPUT_DIRECTORY_CONFIG
|
||||
/prop_tgt/LIBRARY_OUTPUT_DIRECTORY
|
||||
/prop_tgt/LIBRARY_OUTPUT_NAME_CONFIG
|
||||
/prop_tgt/LIBRARY_OUTPUT_DIRECTORY_CONFIG
|
||||
/prop_tgt/LIBRARY_OUTPUT_NAME
|
||||
/prop_tgt/LINK_DEPENDS_NO_SHARED
|
||||
/prop_tgt/LIBRARY_OUTPUT_NAME_CONFIG
|
||||
/prop_tgt/LINK_DEPENDS
|
||||
/prop_tgt/LINKER_LANGUAGE
|
||||
/prop_tgt/LINK_DEPENDS_NO_SHARED
|
||||
/prop_tgt/LINK_DIRECTORIES
|
||||
/prop_tgt/LINK_FLAGS_CONFIG
|
||||
/prop_tgt/LINK_FLAGS
|
||||
/prop_tgt/LINK_INTERFACE_LIBRARIES_CONFIG
|
||||
/prop_tgt/LINK_FLAGS_CONFIG
|
||||
/prop_tgt/LINK_INTERFACE_LIBRARIES
|
||||
/prop_tgt/LINK_INTERFACE_MULTIPLICITY_CONFIG
|
||||
/prop_tgt/LINK_INTERFACE_LIBRARIES_CONFIG
|
||||
/prop_tgt/LINK_INTERFACE_MULTIPLICITY
|
||||
/prop_tgt/LINK_INTERFACE_MULTIPLICITY_CONFIG
|
||||
/prop_tgt/LINK_LIBRARIES
|
||||
/prop_tgt/LINK_OPTIONS
|
||||
/prop_tgt/LINK_SEARCH_END_STATIC
|
||||
/prop_tgt/LINK_SEARCH_START_STATIC
|
||||
/prop_tgt/LINK_WHAT_YOU_USE
|
||||
/prop_tgt/LOCATION_CONFIG
|
||||
/prop_tgt/LINKER_LANGUAGE
|
||||
/prop_tgt/LOCATION
|
||||
/prop_tgt/LOCATION_CONFIG
|
||||
/prop_tgt/MACHO_COMPATIBILITY_VERSION
|
||||
/prop_tgt/MACHO_CURRENT_VERSION
|
||||
/prop_tgt/MACOSX_BUNDLE_INFO_PLIST
|
||||
/prop_tgt/MACOSX_BUNDLE
|
||||
/prop_tgt/MACOSX_BUNDLE_INFO_PLIST
|
||||
/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST
|
||||
/prop_tgt/MACOSX_RPATH
|
||||
/prop_tgt/MANUALLY_ADDED_DEPENDENCIES
|
||||
@@ -310,16 +311,16 @@ Properties on Targets
|
||||
/prop_tgt/OBJCXX_STANDARD
|
||||
/prop_tgt/OBJCXX_STANDARD_REQUIRED
|
||||
/prop_tgt/OPTIMIZE_DEPENDENCIES
|
||||
/prop_tgt/OSX_ARCHITECTURES_CONFIG
|
||||
/prop_tgt/OSX_ARCHITECTURES
|
||||
/prop_tgt/OUTPUT_NAME_CONFIG
|
||||
/prop_tgt/OSX_ARCHITECTURES_CONFIG
|
||||
/prop_tgt/OUTPUT_NAME
|
||||
/prop_tgt/OUTPUT_NAME_CONFIG
|
||||
/prop_tgt/PCH_WARN_INVALID
|
||||
/prop_tgt/PCH_INSTANTIATE_TEMPLATES
|
||||
/prop_tgt/PDB_NAME_CONFIG
|
||||
/prop_tgt/PDB_NAME
|
||||
/prop_tgt/PDB_OUTPUT_DIRECTORY_CONFIG
|
||||
/prop_tgt/PDB_NAME_CONFIG
|
||||
/prop_tgt/PDB_OUTPUT_DIRECTORY
|
||||
/prop_tgt/PDB_OUTPUT_DIRECTORY_CONFIG
|
||||
/prop_tgt/POSITION_INDEPENDENT_CODE
|
||||
/prop_tgt/PRECOMPILE_HEADERS
|
||||
/prop_tgt/PRECOMPILE_HEADERS_REUSE_FROM
|
||||
@@ -331,16 +332,16 @@ Properties on Targets
|
||||
/prop_tgt/RULE_LAUNCH_COMPILE
|
||||
/prop_tgt/RULE_LAUNCH_CUSTOM
|
||||
/prop_tgt/RULE_LAUNCH_LINK
|
||||
/prop_tgt/RUNTIME_OUTPUT_DIRECTORY_CONFIG
|
||||
/prop_tgt/RUNTIME_OUTPUT_DIRECTORY
|
||||
/prop_tgt/RUNTIME_OUTPUT_NAME_CONFIG
|
||||
/prop_tgt/RUNTIME_OUTPUT_DIRECTORY_CONFIG
|
||||
/prop_tgt/RUNTIME_OUTPUT_NAME
|
||||
/prop_tgt/RUNTIME_OUTPUT_NAME_CONFIG
|
||||
/prop_tgt/SKIP_BUILD_RPATH
|
||||
/prop_tgt/SOURCE_DIR
|
||||
/prop_tgt/SOURCES
|
||||
/prop_tgt/SOVERSION
|
||||
/prop_tgt/STATIC_LIBRARY_FLAGS_CONFIG
|
||||
/prop_tgt/STATIC_LIBRARY_FLAGS
|
||||
/prop_tgt/STATIC_LIBRARY_FLAGS_CONFIG
|
||||
/prop_tgt/STATIC_LIBRARY_OPTIONS
|
||||
/prop_tgt/SUFFIX
|
||||
/prop_tgt/Swift_DEPENDENCIES_FILE
|
||||
@@ -361,12 +362,12 @@ Properties on Targets
|
||||
/prop_tgt/VS_DEBUGGER_ENVIRONMENT
|
||||
/prop_tgt/VS_DEBUGGER_WORKING_DIRECTORY
|
||||
/prop_tgt/VS_DESKTOP_EXTENSIONS_VERSION
|
||||
/prop_tgt/VS_DOTNET_DOCUMENTATION_FILE
|
||||
/prop_tgt/VS_DOTNET_REFERENCE_refname
|
||||
/prop_tgt/VS_DOTNET_REFERENCEPROP_refname_TAG_tagname
|
||||
/prop_tgt/VS_DOTNET_REFERENCES
|
||||
/prop_tgt/VS_DOTNET_REFERENCES_COPY_LOCAL
|
||||
/prop_tgt/VS_DOTNET_TARGET_FRAMEWORK_VERSION
|
||||
/prop_tgt/VS_DOTNET_DOCUMENTATION_FILE
|
||||
/prop_tgt/VS_DPI_AWARE
|
||||
/prop_tgt/VS_GLOBAL_KEYWORD
|
||||
/prop_tgt/VS_GLOBAL_PROJECT_TYPES
|
||||
@@ -431,8 +432,8 @@ Properties on Tests
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
/prop_test/ATTACHED_FILES_ON_FAIL
|
||||
/prop_test/ATTACHED_FILES
|
||||
/prop_test/ATTACHED_FILES_ON_FAIL
|
||||
/prop_test/COST
|
||||
/prop_test/DEPENDS
|
||||
/prop_test/DISABLED
|
||||
|
||||
@@ -27,10 +27,10 @@ Variables that Provide Information
|
||||
/variable/CMAKE_ARGV0
|
||||
/variable/CMAKE_BINARY_DIR
|
||||
/variable/CMAKE_BUILD_TOOL
|
||||
/variable/CMAKE_CACHEFILE_DIR
|
||||
/variable/CMAKE_CACHE_MAJOR_VERSION
|
||||
/variable/CMAKE_CACHE_MINOR_VERSION
|
||||
/variable/CMAKE_CACHE_PATCH_VERSION
|
||||
/variable/CMAKE_CACHEFILE_DIR
|
||||
/variable/CMAKE_CFG_INTDIR
|
||||
/variable/CMAKE_COMMAND
|
||||
/variable/CMAKE_CPACK_COMMAND
|
||||
@@ -353,6 +353,7 @@ Variables that Control the Build
|
||||
/variable/CMAKE_ANDROID_SKIP_ANT_STEP
|
||||
/variable/CMAKE_ANDROID_STANDALONE_TOOLCHAIN
|
||||
/variable/CMAKE_ANDROID_STL_TYPE
|
||||
/variable/CMAKE_APPLE_SILICON_PROCESSOR
|
||||
/variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY
|
||||
/variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY_CONFIG
|
||||
/variable/CMAKE_AUTOGEN_ORIGIN_DEPENDS
|
||||
@@ -378,9 +379,9 @@ Variables that Control the Build
|
||||
/variable/CMAKE_CONFIG_POSTFIX
|
||||
/variable/CMAKE_CROSS_CONFIGS
|
||||
/variable/CMAKE_CTEST_ARGUMENTS
|
||||
/variable/CMAKE_CUDA_SEPARABLE_COMPILATION
|
||||
/variable/CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS
|
||||
/variable/CMAKE_CUDA_RUNTIME_LIBRARY
|
||||
/variable/CMAKE_CUDA_SEPARABLE_COMPILATION
|
||||
/variable/CMAKE_DEBUG_POSTFIX
|
||||
/variable/CMAKE_DEFAULT_BUILD_TYPE
|
||||
/variable/CMAKE_DEFAULT_CONFIGS
|
||||
@@ -497,8 +498,8 @@ Variables for Languages
|
||||
/variable/CMAKE_COMPILER_IS_GNUG77
|
||||
/variable/CMAKE_CUDA_ARCHITECTURES
|
||||
/variable/CMAKE_CUDA_COMPILE_FEATURES
|
||||
/variable/CMAKE_CUDA_HOST_COMPILER
|
||||
/variable/CMAKE_CUDA_EXTENSIONS
|
||||
/variable/CMAKE_CUDA_HOST_COMPILER
|
||||
/variable/CMAKE_CUDA_STANDARD
|
||||
/variable/CMAKE_CUDA_STANDARD_REQUIRED
|
||||
/variable/CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES
|
||||
@@ -514,6 +515,7 @@ Variables for Languages
|
||||
/variable/CMAKE_Fortran_MODDIR_FLAG
|
||||
/variable/CMAKE_Fortran_MODOUT_FLAG
|
||||
/variable/CMAKE_ISPC_HEADER_DIRECTORY
|
||||
/variable/CMAKE_ISPC_HEADER_SUFFIX
|
||||
/variable/CMAKE_ISPC_INSTRUCTION_SETS
|
||||
/variable/CMAKE_LANG_ANDROID_TOOLCHAIN_MACHINE
|
||||
/variable/CMAKE_LANG_ANDROID_TOOLCHAIN_PREFIX
|
||||
@@ -550,11 +552,11 @@ Variables for Languages
|
||||
/variable/CMAKE_LANG_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
|
||||
/variable/CMAKE_LANG_IMPLICIT_LINK_LIBRARIES
|
||||
/variable/CMAKE_LANG_LIBRARY_ARCHITECTURE
|
||||
/variable/CMAKE_LANG_LINK_EXECUTABLE
|
||||
/variable/CMAKE_LANG_LINKER_PREFERENCE
|
||||
/variable/CMAKE_LANG_LINKER_PREFERENCE_PROPAGATES
|
||||
/variable/CMAKE_LANG_LINKER_WRAPPER_FLAG
|
||||
/variable/CMAKE_LANG_LINKER_WRAPPER_FLAG_SEP
|
||||
/variable/CMAKE_LANG_LINK_EXECUTABLE
|
||||
/variable/CMAKE_LANG_OUTPUT_EXTENSION
|
||||
/variable/CMAKE_LANG_SIMULATE_ID
|
||||
/variable/CMAKE_LANG_SIMULATE_VERSION
|
||||
|
||||
@@ -8,6 +8,7 @@ Target file component generator expressions do not add target dependencies.
|
||||
The following target-based generator expressions that query for directory or
|
||||
file name components no longer add a dependency on the evaluated target.
|
||||
|
||||
- ``TARGET_FILE_NAME``
|
||||
- ``TARGET_FILE_DIR``
|
||||
- ``TARGET_LINKER_FILE_BASE_NAME``
|
||||
- ``TARGET_LINKER_FILE_NAME``
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
ISPC_HEADER_SUFFIX
|
||||
------------------
|
||||
|
||||
.. versionadded:: 3.19.2
|
||||
|
||||
Specify output suffix to be used for ISPC generated headers provided by the target.
|
||||
|
||||
This property is initialized by the value of the :variable:`CMAKE_ISPC_HEADER_SUFFIX`
|
||||
variable if it is set when a target is created.
|
||||
|
||||
If the target contains ISPC source files, this specifies the header suffix to
|
||||
be used for the generated headers.
|
||||
|
||||
The default value is ``_ispc.h``.
|
||||
@@ -38,3 +38,6 @@ side effects that are relevant for the Fortran library. However, if you build
|
||||
the middle C library, the bottom Fortran library will also build, even though
|
||||
it does not have any side effects that are relevant to the C library, since the
|
||||
C library does not have optimization enabled.
|
||||
|
||||
This property is initialized by the value of the
|
||||
:variable:`CMAKE_OPTIMIZE_DEPENDENCIES` variable when the target is created.
|
||||
|
||||
@@ -53,6 +53,22 @@ Languages
|
||||
|
||||
* ``CUDA`` language support now works on QNX.
|
||||
|
||||
Platforms
|
||||
---------
|
||||
|
||||
* Apple Silicon is now supported (since CMake 3.19.2):
|
||||
|
||||
* The :variable:`CMAKE_HOST_SYSTEM_PROCESSOR` is selected using ``uname -m``.
|
||||
Since this may vary based on CMake's own architecture and that of
|
||||
the invoking process tree, the :variable:`CMAKE_APPLE_SILICON_PROCESSOR`
|
||||
variable or :envvar:`CMAKE_APPLE_SILICON_PROCESSOR` environment
|
||||
variable may be set to specify a host architecture explicitly.
|
||||
|
||||
* If :variable:`CMAKE_OSX_ARCHITECTURES` is not set, CMake adds explicit
|
||||
flags to tell the compiler to build for the
|
||||
:variable:`CMAKE_HOST_SYSTEM_PROCESSOR` so the toolchain does not
|
||||
have to guess based on the process tree's architecture.
|
||||
|
||||
File-Based API
|
||||
--------------
|
||||
|
||||
@@ -330,3 +346,42 @@ Other Changes
|
||||
* If ``CUDA`` compiler detection fails with user-specified
|
||||
:variable:`CMAKE_CUDA_ARCHITECTURES` or
|
||||
:variable:`CMAKE_CUDA_HOST_COMPILER`, an error is raised.
|
||||
|
||||
Updates
|
||||
=======
|
||||
|
||||
Changes made since CMake 3.19.0 include the following.
|
||||
|
||||
3.19.1
|
||||
------
|
||||
|
||||
* CMake 3.19.0 compiles source files with the :prop_sf:`LANGUAGE`
|
||||
property by passing an explicit language flag such as ``-x c``.
|
||||
This is consistent with the property's documented meaning that
|
||||
the source file is written in the specified language. However,
|
||||
it can break projects that were using the property only to
|
||||
cause the specified language's compiler to be used. This has
|
||||
been reverted to restore behavior from CMake 3.18 and below.
|
||||
|
||||
* CUDA 11.1 support for Clang.
|
||||
|
||||
3.19.2
|
||||
------
|
||||
|
||||
* The precompiled macOS binary provided on ``cmake.org`` is now a
|
||||
universal binary with ``x86_64`` and ``arm64`` architectures.
|
||||
It requires macOS 10.10 or newer.
|
||||
The package file naming pattern has been changed from
|
||||
``cmake-$ver-Darwin-x86_64`` to ``cmake-$ver-macos-universal``.
|
||||
|
||||
* Apple Silicon host architecture selection support was updated.
|
||||
CMake 3.19.0 and 3.19.1 always chose ``arm64`` as the host architecture.
|
||||
CMake 3.19.2 returns to using ``uname -m`` as CMake 3.18 and below did.
|
||||
Since this may vary based on CMake's own architecture and that of
|
||||
the invoking process tree, the :variable:`CMAKE_APPLE_SILICON_PROCESSOR`
|
||||
variable or :envvar:`CMAKE_APPLE_SILICON_PROCESSOR` environment
|
||||
variable may be set to specify a host architecture explicitly.
|
||||
|
||||
* The :variable:`CMAKE_ISPC_HEADER_SUFFIX` variable and corresponding
|
||||
:prop_tgt:`ISPC_HEADER_SUFFIX` target property were added to control
|
||||
the header suffix used by ``ISPC`` compiler generated headers.
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
CMAKE_APPLE_SILICON_PROCESSOR
|
||||
-----------------------------
|
||||
|
||||
.. versionadded:: 3.19.2
|
||||
|
||||
On Apple Silicon hosts running macOS, set this variable to tell
|
||||
CMake what architecture to use for :variable:`CMAKE_HOST_SYSTEM_PROCESSOR`.
|
||||
The value must be either ``arm64`` or ``x86_64``.
|
||||
|
||||
The value of this variable should never be modified by project code.
|
||||
It is meant to be set by a toolchain file specified by the
|
||||
:variable:`CMAKE_TOOLCHAIN_FILE` variable, or as a cache entry
|
||||
provided by the user, e.g. via ``-DCMAKE_APPLE_SILICON_PROCESSOR=...``.
|
||||
|
||||
See also the :envvar:`CMAKE_APPLE_SILICON_PROCESSOR` environment variable.
|
||||
@@ -3,13 +3,40 @@ CMAKE_HOST_SYSTEM_PROCESSOR
|
||||
|
||||
The name of the CPU CMake is running on.
|
||||
|
||||
On Windows, this variable is set to the value of the environment variable
|
||||
``PROCESSOR_ARCHITECTURE``. On systems that support ``uname``, this variable is
|
||||
set to the output of:
|
||||
Windows Platforms
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
- ``uname -m`` on GNU, Linux, Cygwin, Darwin, Android, or
|
||||
On Windows, this variable is set to the value of the environment variable
|
||||
``PROCESSOR_ARCHITECTURE``.
|
||||
|
||||
Unix Platforms
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
On systems that support ``uname``, this variable is set to the output of:
|
||||
|
||||
- ``uname -m`` on GNU, Linux, Cygwin, Android, or
|
||||
- ``arch`` on OpenBSD, or
|
||||
- on other systems,
|
||||
|
||||
* ``uname -p`` if its exit code is nonzero, or
|
||||
* ``uname -m`` otherwise.
|
||||
|
||||
macOS Platforms
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The value of ``uname -m`` is used by default.
|
||||
|
||||
On Apple Silicon hosts, the architecture printed by ``uname -m`` may vary
|
||||
based on CMake's own architecture and that of the invoking process tree.
|
||||
|
||||
.. versionadded:: 3.19.2
|
||||
|
||||
On Apple Silicon hosts:
|
||||
|
||||
* The :variable:`CMAKE_APPLE_SILICON_PROCESSOR` variable or
|
||||
the :envvar:`CMAKE_APPLE_SILICON_PROCESSOR` environment variable
|
||||
may be set to specify the host architecture explicitly.
|
||||
|
||||
* If :variable:`CMAKE_OSX_ARCHITECTURES` is not set, CMake adds explicit
|
||||
flags to tell the compiler to build for the host architecture so the
|
||||
toolchain does not have to guess based on the process tree's architecture.
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
CMAKE_ISPC_HEADER_SUFFIX
|
||||
------------------------
|
||||
|
||||
.. versionadded:: 3.19.2
|
||||
|
||||
Output suffix to be used for ISPC generated headers.
|
||||
|
||||
This variable is used to initialize the :prop_tgt:`ISPC_HEADER_SUFFIX`
|
||||
property on all the targets. See the target property for additional
|
||||
information.
|
||||
@@ -25,8 +25,6 @@ include:
|
||||
HP = Hewlett-Packard Compiler (hp.com)
|
||||
IAR = IAR Systems (iar.com)
|
||||
Intel = Intel Compiler (intel.com)
|
||||
IntelDPCPP = Intel DPCPP Compiler (intel.com)
|
||||
IntelClang = Intel Clang Compiler (intel.com)
|
||||
MSVC = Microsoft Visual Studio (microsoft.com)
|
||||
NVIDIA = NVIDIA CUDA Compiler (nvidia.com)
|
||||
OpenWatcom = Open Watcom (openwatcom.org)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_COVERAGE_EXCLUDE
|
||||
-----------------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
A list of regular expressions which will be used to exclude files by their
|
||||
path from coverage output by the :command:`ctest_coverage` command.
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_ERROR_EXCEPTION
|
||||
----------------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
A list of regular expressions which will be used to exclude when detecting
|
||||
error messages in build outputs by the :command:`ctest_test` command.
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_ERROR_MATCH
|
||||
------------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
A list of regular expressions which will be used to detect error messages in
|
||||
build outputs by the :command:`ctest_test` command.
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_ERROR_POST_CONTEXT
|
||||
-------------------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
The number of lines to include as context which follow an error message by the
|
||||
:command:`ctest_test` command. The default is 10.
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_ERROR_PRE_CONTEXT
|
||||
------------------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
The number of lines to include as context which precede an error message by
|
||||
the :command:`ctest_test` command. The default is 10.
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE
|
||||
--------------------------------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
When saving a failing test's output, this is the maximum size, in bytes, that
|
||||
will be collected by the :command:`ctest_test` command. Defaults to 307200
|
||||
(300 KiB).
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS
|
||||
-------------------------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
The maximum number of errors in a single build step which will be detected.
|
||||
After this, the :command:`ctest_test` command will truncate the output.
|
||||
Defaults to 50.
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS
|
||||
---------------------------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
The maximum number of warnings in a single build step which will be detected.
|
||||
After this, the :command:`ctest_test` command will truncate the output.
|
||||
Defaults to 50.
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE
|
||||
--------------------------------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
When saving a passing test's output, this is the maximum size, in bytes, that
|
||||
will be collected by the :command:`ctest_test` command. Defaults to 1024
|
||||
(1 KiB).
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_MEMCHECK_IGNORE
|
||||
----------------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
A list of regular expressions to use to exclude tests during the
|
||||
:command:`ctest_memcheck` command.
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_POST_MEMCHECK
|
||||
--------------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
A list of commands to run at the end of the :command:`ctest_memcheck` command.
|
||||
|
||||
.. include:: CTEST_CUSTOM_XXX.txt
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_POST_TEST
|
||||
----------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
A list of commands to run at the end of the :command:`ctest_test` command.
|
||||
|
||||
.. include:: CTEST_CUSTOM_XXX.txt
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_PRE_MEMCHECK
|
||||
-------------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
A list of commands to run at the start of the :command:`ctest_memcheck`
|
||||
command.
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_PRE_TEST
|
||||
----------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
A list of commands to run at the start of the :command:`ctest_test` command.
|
||||
|
||||
.. include:: CTEST_CUSTOM_XXX.txt
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_TESTS_IGNORE
|
||||
-------------------------
|
||||
|
||||
.. versionadded:: 3.14
|
||||
|
||||
A list of regular expressions to use to exclude tests during the
|
||||
:command:`ctest_test` command.
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_WARNING_EXCEPTION
|
||||
------------------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
A list of regular expressions which will be used to exclude when detecting
|
||||
warning messages in build outputs by the :command:`ctest_build` command.
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CTEST_CUSTOM_WARNING_MATCH
|
||||
--------------------------
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
A list of regular expressions which will be used to detect warning messages in
|
||||
build outputs by the :command:`ctest_build` command.
|
||||
|
||||
|
||||
@@ -9,13 +9,6 @@
|
||||
# The variable CVF_VERSION must be set before calling configure_file().
|
||||
|
||||
|
||||
if (PACKAGE_FIND_VERSION_RANGE)
|
||||
message(AUTHOR_WARNING
|
||||
"`find_package()` specify a version range but the version strategy "
|
||||
"(SameMajorVersion) of the module `${PACKAGE_FIND_NAME}` is incompatible "
|
||||
"with this request. Only the lower endpoint of the range will be used.")
|
||||
endif()
|
||||
|
||||
set(PACKAGE_VERSION "@CVF_VERSION@")
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
@@ -28,14 +21,30 @@ else()
|
||||
set(CVF_VERSION_MAJOR "@CVF_VERSION@")
|
||||
endif()
|
||||
|
||||
if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR)
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION_RANGE)
|
||||
# both endpoints of the range must have the expected major version
|
||||
math (EXPR CVF_VERSION_MAJOR_NEXT "${CVF_VERSION_MAJOR} + 1")
|
||||
if (NOT PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
|
||||
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX_MAJOR STREQUAL CVF_VERSION_MAJOR)
|
||||
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX VERSION_LESS_EQUAL CVF_VERSION_MAJOR_NEXT)))
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
elseif(PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
|
||||
AND ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS_EQUAL PACKAGE_FIND_VERSION_MAX)
|
||||
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MAX)))
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
endif()
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
endif()
|
||||
if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR)
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
endif()
|
||||
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -10,13 +10,6 @@
|
||||
# The variable CVF_VERSION must be set before calling configure_file().
|
||||
|
||||
|
||||
if (PACKAGE_FIND_VERSION_RANGE)
|
||||
message(AUTHOR_WARNING
|
||||
"`find_package()` specify a version range but the version strategy "
|
||||
"(SameMinorVersion) of the module `${PACKAGE_FIND_NAME}` is incompatible "
|
||||
"with this request. Only the lower endpoint of the range will be used.")
|
||||
endif()
|
||||
|
||||
set(PACKAGE_VERSION "@CVF_VERSION@")
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
@@ -31,15 +24,36 @@ else()
|
||||
set(CVF_VERSION_MINOR "")
|
||||
endif()
|
||||
|
||||
if((PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) AND
|
||||
(PACKAGE_FIND_VERSION_MINOR STREQUAL CVF_VERSION_MINOR))
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION_RANGE)
|
||||
# both endpoints of the range must have the expected major and minor versions
|
||||
math (EXPR CVF_VERSION_MINOR_NEXT "${CVF_VERSION_MINOR} + 1")
|
||||
if (NOT (PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
|
||||
AND PACKAGE_FIND_VERSION_MIN_MINOR STREQUAL CVF_VERSION_MINOR)
|
||||
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE"
|
||||
AND NOT (PACKAGE_FIND_VERSION_MAX_MAJOR STREQUAL CVF_VERSION_MAJOR
|
||||
AND PACKAGE_FIND_VERSION_MAX_MINOR STREQUAL CVF_VERSION_MINOR))
|
||||
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE"
|
||||
AND NOT PACKAGE_FIND_VERSION_MAX VERSION_LESS_EQUAL ${CVF_VERSION_MAJOR}.${CVF_VERSION_MINOR_NEXT})))
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
elseif(PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
|
||||
AND PACKAGE_FIND_VERSION_MIN_MINOR STREQUAL CVF_VERSION_MINOR
|
||||
AND ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS_EQUAL PACKAGE_FIND_VERSION_MAX)
|
||||
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MAX)))
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
endif()
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
endif()
|
||||
if((PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) AND
|
||||
(PACKAGE_FIND_VERSION_MINOR STREQUAL CVF_VERSION_MINOR))
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
endif()
|
||||
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
||||
#endif
|
||||
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
#if defined(_CRAYC) || defined(__cray__)
|
||||
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
#endif
|
||||
|
||||
@@ -77,7 +77,7 @@ int main(int argc, char* argv[])
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
#if defined(_CRAYC) || defined(__cray__)
|
||||
require += info_cray[argc];
|
||||
#endif
|
||||
require += info_language_dialect_default[argc];
|
||||
|
||||
@@ -20,7 +20,7 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
||||
#endif
|
||||
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
#if defined(_CRAYC) || defined(__cray__)
|
||||
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
#endif
|
||||
|
||||
@@ -76,7 +76,7 @@ int main(int argc, char* argv[])
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
#if defined(_CRAYC) || defined(__cray__)
|
||||
require += info_cray[argc];
|
||||
#endif
|
||||
require += info_language_dialect_default[argc];
|
||||
|
||||
@@ -78,8 +78,6 @@ function(compiler_id_detection outvar lang)
|
||||
ARMCC
|
||||
AppleClang
|
||||
ARMClang
|
||||
IntelDPCPP
|
||||
IntelClang
|
||||
Clang
|
||||
GNU
|
||||
MSVC
|
||||
|
||||
@@ -176,13 +176,15 @@ if(NOT CMAKE_CUDA_COMPILER_ID_RUN)
|
||||
# In a non-scattered installation the following are equivalent to CMAKE_CUDA_COMPILER_TOOLKIT_ROOT.
|
||||
# We first check for a non-scattered installation to prefer it over a scattered installation.
|
||||
|
||||
# CMAKE_CUDA_COMPILER_LIBRARY_ROOT contains the device library and version file.
|
||||
if(EXISTS "${CMAKE_CUDA_COMPILER_TOOLKIT_ROOT}/version.txt")
|
||||
# CMAKE_CUDA_COMPILER_LIBRARY_ROOT contains the device library.
|
||||
if(EXISTS "${CMAKE_CUDA_COMPILER_TOOLKIT_ROOT}/nvvm/libdevice")
|
||||
set(CMAKE_CUDA_COMPILER_LIBRARY_ROOT "${CMAKE_CUDA_COMPILER_TOOLKIT_ROOT}")
|
||||
elseif(CMAKE_SYSROOT_LINK AND EXISTS "${CMAKE_SYSROOT_LINK}/usr/lib/cuda/version.txt")
|
||||
elseif(CMAKE_SYSROOT_LINK AND EXISTS "${CMAKE_SYSROOT_LINK}/usr/lib/cuda/nvvm/libdevice")
|
||||
set(CMAKE_CUDA_COMPILER_LIBRARY_ROOT "${CMAKE_SYSROOT_LINK}/usr/lib/cuda")
|
||||
elseif(EXISTS "${CMAKE_SYSROOT}/usr/lib/cuda/version.txt")
|
||||
elseif(EXISTS "${CMAKE_SYSROOT}/usr/lib/cuda/nvvm/libdevice")
|
||||
set(CMAKE_CUDA_COMPILER_LIBRARY_ROOT "${CMAKE_SYSROOT}/usr/lib/cuda")
|
||||
else()
|
||||
message(FATAL_ERROR "Couldn't find CUDA library root.")
|
||||
endif()
|
||||
|
||||
# CMAKE_CUDA_COMPILER_TOOLKIT_LIBRARY_ROOT contains the linking stubs necessary for device linking and other low-level library files.
|
||||
|
||||
@@ -413,7 +413,14 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
|
||||
endif()
|
||||
set(cuda_tools "CUDA ${CMAKE_VS_PLATFORM_TOOLSET_CUDA}")
|
||||
set(id_compile "CudaCompile")
|
||||
set(id_ItemDefinitionGroup_entry "<CudaCompile><AdditionalOptions>%(AdditionalOptions)-v</AdditionalOptions></CudaCompile>")
|
||||
if(CMAKE_VS_PLATFORM_NAME STREQUAL x64)
|
||||
set(cuda_target "<TargetMachinePlatform>64</TargetMachinePlatform>")
|
||||
endif()
|
||||
foreach(arch ${CMAKE_CUDA_ARCHITECTURES})
|
||||
string(REGEX MATCH "[0-9]+" arch_name "${arch}")
|
||||
string(APPEND cuda_codegen "compute_${arch_name},sm_${arch_name};")
|
||||
endforeach()
|
||||
set(id_ItemDefinitionGroup_entry "<CudaCompile>${cuda_target}<AdditionalOptions>%(AdditionalOptions)-v</AdditionalOptions><CodeGeneration>${cuda_codegen}</CodeGeneration></CudaCompile>")
|
||||
set(id_PostBuildEvent_Command [[echo CMAKE_CUDA_COMPILER=$(CudaToolkitBinDir)\nvcc.exe]])
|
||||
if(CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR)
|
||||
set(id_CudaToolkitCustomDir "<CudaToolkitCustomDir>${CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR}nvcc</CudaToolkitCustomDir>")
|
||||
@@ -423,9 +430,6 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
|
||||
string(CONCAT id_Import_props [[<Import Project="$(VCTargetsPath)\BuildCustomizations\]] "${cuda_tools}" [[.props" />]])
|
||||
string(CONCAT id_Import_targets [[<Import Project="$(VCTargetsPath)\BuildCustomizations\]] "${cuda_tools}" [[.targets" />]])
|
||||
endif()
|
||||
if(CMAKE_VS_PLATFORM_NAME STREQUAL x64)
|
||||
set(id_ItemDefinitionGroup_entry "<CudaCompile><TargetMachinePlatform>64</TargetMachinePlatform><AdditionalOptions>%(AdditionalOptions)-v</AdditionalOptions></CudaCompile>")
|
||||
endif()
|
||||
if(CMAKE_CUDA_FLAGS MATCHES "(^| )-cudart +shared( |$)")
|
||||
set(id_Link_AdditionalDependencies "<AdditionalDependencies>cudart.lib</AdditionalDependencies>")
|
||||
else()
|
||||
@@ -748,19 +752,28 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
set(COMPILER_ID_TWICE)
|
||||
|
||||
# With the IAR Compiler, some strings are found twice, first time as incomplete
|
||||
# list like "?<Constant "INFO:compiler[IAR]">". Remove the incomplete copies.
|
||||
list(FILTER CMAKE_${lang}_COMPILER_ID_STRINGS EXCLUDE REGEX "\\?<Constant \\\"")
|
||||
|
||||
# The IAR-AVR compiler uses a binary format that places a '6'
|
||||
# character (0x34) before each character in the string. Strip
|
||||
# out these characters without removing any legitimate characters.
|
||||
if(CMAKE_${lang}_COMPILER_ID_STRINGS MATCHES "(.)I.N.F.O.:.")
|
||||
string(REGEX REPLACE "${CMAKE_MATCH_1}([^;])" "\\1"
|
||||
CMAKE_${lang}_COMPILER_ID_STRINGS "${CMAKE_${lang}_COMPILER_ID_STRINGS}")
|
||||
endif()
|
||||
|
||||
# Remove arbitrary text that may appear before or after each INFO string.
|
||||
string(REGEX MATCHALL "INFO:[A-Za-z0-9_]+\\[([^]\"]*)\\]"
|
||||
CMAKE_${lang}_COMPILER_ID_STRINGS "${CMAKE_${lang}_COMPILER_ID_STRINGS}")
|
||||
|
||||
# In C# binaries, some strings are found more than once.
|
||||
list(REMOVE_DUPLICATES CMAKE_${lang}_COMPILER_ID_STRINGS)
|
||||
|
||||
set(COMPILER_ID_TWICE)
|
||||
foreach(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
|
||||
# The IAR-AVR compiler uses a binary format that places a '6'
|
||||
# character (0x34) before each character in the string. Strip
|
||||
# out these characters without removing any legitimate characters.
|
||||
if("${info}" MATCHES "(.)I.N.F.O.:.")
|
||||
string(REGEX REPLACE "${CMAKE_MATCH_1}(.)" "\\1" info "${info}")
|
||||
endif()
|
||||
if("${info}" MATCHES "INFO:compiler\\[([^]\"]*)\\]")
|
||||
if(COMPILER_ID)
|
||||
set(COMPILER_ID_TWICE 1)
|
||||
|
||||
@@ -43,25 +43,44 @@ if(CMAKE_HOST_UNIX)
|
||||
else()
|
||||
exec_program(${CMAKE_UNAME} ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
|
||||
endif()
|
||||
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*|Darwin|^GNU$|Android")
|
||||
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*|^GNU$|Android")
|
||||
exec_program(${CMAKE_UNAME} ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
|
||||
RETURN_VALUE val)
|
||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
|
||||
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
# Check whether we are running under Rosetta on arm64 hardware.
|
||||
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin")
|
||||
# If we are running on Apple Silicon, honor CMAKE_APPLE_SILICON_PROCESSOR.
|
||||
if(DEFINED CMAKE_APPLE_SILICON_PROCESSOR)
|
||||
set(_CMAKE_APPLE_SILICON_PROCESSOR "${CMAKE_APPLE_SILICON_PROCESSOR}")
|
||||
elseif(DEFINED ENV{CMAKE_APPLE_SILICON_PROCESSOR})
|
||||
set(_CMAKE_APPLE_SILICON_PROCESSOR "$ENV{CMAKE_APPLE_SILICON_PROCESSOR}")
|
||||
else()
|
||||
set(_CMAKE_APPLE_SILICON_PROCESSOR "")
|
||||
endif()
|
||||
if(_CMAKE_APPLE_SILICON_PROCESSOR)
|
||||
if(";${_CMAKE_APPLE_SILICON_PROCESSOR};" MATCHES "^;(arm64|x86_64);$")
|
||||
execute_process(COMMAND sysctl -q hw.optional.arm64
|
||||
OUTPUT_VARIABLE _sysctl_stdout
|
||||
ERROR_VARIABLE _sysctl_stderr
|
||||
RESULT_VARIABLE _sysctl_result
|
||||
)
|
||||
if(_sysctl_result EQUAL 0 AND _sysctl_stdout MATCHES "hw.optional.arm64: 1")
|
||||
set(CMAKE_HOST_SYSTEM_PROCESSOR "arm64")
|
||||
if(NOT _sysctl_result EQUAL 0 OR NOT _sysctl_stdout MATCHES "hw.optional.arm64: 1")
|
||||
set(_CMAKE_APPLE_SILICON_PROCESSOR "")
|
||||
endif()
|
||||
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "Power Macintosh")
|
||||
# OS X ppc 'uname -m' may report 'Power Macintosh' instead of 'powerpc'
|
||||
set(CMAKE_HOST_SYSTEM_PROCESSOR "powerpc")
|
||||
unset(_sysctl_result)
|
||||
unset(_sysctl_stderr)
|
||||
unset(_sysctl_stdout)
|
||||
endif()
|
||||
endif()
|
||||
if(_CMAKE_APPLE_SILICON_PROCESSOR)
|
||||
set(CMAKE_HOST_SYSTEM_PROCESSOR "${_CMAKE_APPLE_SILICON_PROCESSOR}")
|
||||
else()
|
||||
exec_program(${CMAKE_UNAME} ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
|
||||
RETURN_VALUE val)
|
||||
endif()
|
||||
unset(_CMAKE_APPLE_SILICON_PROCESSOR)
|
||||
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "Power Macintosh")
|
||||
# OS X ppc 'uname -m' may report 'Power Macintosh' instead of 'powerpc'
|
||||
set(CMAKE_HOST_SYSTEM_PROCESSOR "powerpc")
|
||||
endif()
|
||||
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "OpenBSD")
|
||||
exec_program(arch ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
|
||||
RETURN_VALUE val)
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
#else
|
||||
PRINT *, 'INFO:compiler[]'
|
||||
#endif
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
#if defined(_CRAYFTN)
|
||||
PRINT *, 'INFO:compiler_wrapper[CrayPrgEnv]'
|
||||
#endif
|
||||
|
||||
|
||||
@@ -159,10 +159,11 @@ If your project has more elaborated version matching rules, you will need to
|
||||
write your own custom ``ConfigVersion.cmake`` file instead of using this
|
||||
macro.
|
||||
|
||||
.. note:: ``COMPATIBILITY_MODE`` ``AnyNewerVersion`` handles the version range
|
||||
if any is specified (see :command:`find_package` command for the details).
|
||||
All other modes are incompatible with version ranges and will display an
|
||||
author warning if one is specified.
|
||||
.. note:: ``COMPATIBILITY_MODE`` ``AnyNewerVersion``, ``SameMajorVersion`` and
|
||||
``SameMinorVersion`` handle the version range if any is specified (see
|
||||
:command:`find_package` command for the details). ``ExactVersion`` is
|
||||
incompatible with version ranges and will display an author warning if one is
|
||||
specified.
|
||||
|
||||
If ``ARCH_INDEPENDENT`` is given, the installed package version will be
|
||||
considered compatible even if it was built for a different architecture than
|
||||
|
||||
@@ -62,7 +62,7 @@ Examples
|
||||
#]=======================================================================]
|
||||
|
||||
|
||||
include (Internal/CMakeCheckCompilerFlag)
|
||||
include (Internal/CMakeTryCompilerOrLinkerFlag)
|
||||
|
||||
function (check_pie_supported)
|
||||
cmake_policy(GET CMP0083 cmp0083)
|
||||
@@ -109,14 +109,16 @@ function (check_pie_supported)
|
||||
|
||||
foreach(lang IN LISTS CHECK_PIE_LANGUAGES)
|
||||
if(_CMAKE_${lang}_PIE_MAY_BE_SUPPORTED_BY_LINKER)
|
||||
cmake_check_compiler_flag(${lang} "${CMAKE_${lang}_LINK_OPTIONS_PIE}"
|
||||
cmake_try_compiler_or_linker_flag(${lang}
|
||||
"${CMAKE_${lang}_LINK_OPTIONS_PIE}"
|
||||
CMAKE_${lang}_LINK_PIE_SUPPORTED
|
||||
OUTPUT_VARIABLE output)
|
||||
if (NOT CMAKE_${lang}_LINK_PIE_SUPPORTED)
|
||||
string (APPEND outputs "PIE (${lang}): ${output}\n")
|
||||
endif()
|
||||
|
||||
cmake_check_compiler_flag(${lang} "${CMAKE_${lang}_LINK_OPTIONS_NO_PIE}"
|
||||
cmake_try_compiler_or_linker_flag(${lang}
|
||||
"${CMAKE_${lang}_LINK_OPTIONS_NO_PIE}"
|
||||
CMAKE_${lang}_LINK_NO_PIE_SUPPORTED
|
||||
OUTPUT_VARIABLE output)
|
||||
if (NOT CMAKE_${lang}_LINK_NO_PIE_SUPPORTED)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
include(Compiler/Clang)
|
||||
__compiler_clang(C)
|
||||
|
||||
set(CMAKE_C_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c)
|
||||
|
||||
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0)
|
||||
set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90")
|
||||
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90")
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
include(Compiler/Clang)
|
||||
__compiler_clang(CXX)
|
||||
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++)
|
||||
|
||||
if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
|
||||
endif()
|
||||
|
||||
@@ -8,8 +8,6 @@ endif()
|
||||
|
||||
if("x${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC")
|
||||
set(CMAKE_C_CLANG_TIDY_DRIVER_MODE "cl")
|
||||
elseif("x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU")
|
||||
set(CMAKE_C_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
|
||||
|
||||
@@ -2,9 +2,7 @@ include(Compiler/Clang)
|
||||
__compiler_clang(CXX)
|
||||
__compiler_clang_cxx_standards(CXX)
|
||||
|
||||
|
||||
if("x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU")
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++)
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
include(Compiler/GNU)
|
||||
__compiler_gnu(C)
|
||||
|
||||
set(CMAKE_C_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c)
|
||||
|
||||
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5)
|
||||
set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90")
|
||||
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90")
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
include(Compiler/GNU)
|
||||
__compiler_gnu(CXX)
|
||||
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++)
|
||||
|
||||
if (WIN32)
|
||||
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fno-keep-inline-dllexport")
|
||||
|
||||
@@ -9,7 +9,6 @@ endif()
|
||||
set(__COMPILER_GNU 1)
|
||||
|
||||
include(Compiler/CMakeCommonCompilerMacros)
|
||||
include(Internal/CMakeCheckCompilerFlag)
|
||||
|
||||
set(__pch_header_C "c-header")
|
||||
set(__pch_header_CXX "c++-header")
|
||||
|
||||
@@ -28,8 +28,6 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
|
||||
|
||||
else()
|
||||
|
||||
set(CMAKE_C_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c)
|
||||
|
||||
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0)
|
||||
set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
|
||||
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
|
||||
|
||||
@@ -42,8 +42,6 @@ if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
|
||||
|
||||
else()
|
||||
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++)
|
||||
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0.0)
|
||||
set(CMAKE_CXX20_STANDARD_COMPILE_OPTION "-std=c++20")
|
||||
set(CMAKE_CXX20_EXTENSION_COMPILE_OPTION "-std=gnu++20")
|
||||
|
||||
@@ -14,8 +14,6 @@ string(APPEND CMAKE_ISPC_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG")
|
||||
set(CMAKE_ISPC_COMPILE_OPTIONS_PIE --pic)
|
||||
set(CMAKE_ISPC_COMPILE_OPTIONS_PIC --pic)
|
||||
|
||||
set(CMAKE_INCLUDE_SYSTEM_FLAG_ISPC -isystem=)
|
||||
|
||||
set(CMAKE_ISPC_RESPONSE_FILE_FLAG "@")
|
||||
set(CMAKE_ISPC_USE_RESPONSE_FILE_FOR_INCLUDES 1)
|
||||
set(CMAKE_ISPC_USE_RESPONSE_FILE_FOR_LIBRARIES 1)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
|
||||
set(_compiler_id_pp_test "defined(__clang__) && defined(__INTEL_CLANG_COMPILER)")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/Clang-DetermineCompilerInternal.cmake")
|
||||
|
||||
string(APPEND _compiler_id_version_compute "
|
||||
# define @PREFIX@COMPILER_VERSION_TWEAK @MACRO_DEC@(__INTEL_CLANG_COMPILER)")
|
||||
@@ -1,7 +0,0 @@
|
||||
|
||||
set(_compiler_id_pp_test "defined(__clang__) && defined(__INTEL_DPCPP_COMPILER__)")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/Clang-DetermineCompilerInternal.cmake")
|
||||
|
||||
string(APPEND _compiler_id_version_compute "
|
||||
# define @PREFIX@COMPILER_VERSION_TWEAK @MACRO_DEC@(__INTEL_DPCPP_COMPILER__)")
|
||||
@@ -26,7 +26,7 @@ else()
|
||||
endif()
|
||||
|
||||
|
||||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "${__COMPILER_TI_C99_VERSION_${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}}")
|
||||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "${__COMPILER_TI_C99_VERSION_${CMAKE_C_COMPILER_ARCHITECTURE_ID}}")
|
||||
|
||||
set(CMAKE_C90_STANDARD_COMPILE_OPTION "--c89" "--strict_ansi")
|
||||
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "--c89" "--relaxed_ansi")
|
||||
@@ -34,8 +34,8 @@ if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "${__COMPILER_TI_C99_VERSION_$
|
||||
set(CMAKE_C99_STANDARD_COMPILE_OPTION "--c99" "--strict_ansi")
|
||||
set(CMAKE_C99_EXTENSION_COMPILE_OPTION "--c99" "--relaxed_ansi")
|
||||
|
||||
if(DEFINED __COMPILER_TI_C11_VERSION_${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} AND
|
||||
CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "${__COMPILER_TI_C11_VERSION_${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}}")
|
||||
if(DEFINED __COMPILER_TI_C11_VERSION_${CMAKE_C_COMPILER_ARCHITECTURE_ID} AND
|
||||
CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "${__COMPILER_TI_C11_VERSION_${CMAKE_C_COMPILER_ARCHITECTURE_ID}}")
|
||||
|
||||
set(CMAKE_C11_STANDARD_COMPILE_OPTION "--c11" "--strict_ansi")
|
||||
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "--c11" "--relaxed_ansi")
|
||||
|
||||
@@ -6,8 +6,6 @@ string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
||||
# -qthreaded = Ensures that all optimizations will be thread-safe
|
||||
string(APPEND CMAKE_C_FLAGS_INIT " -qthreaded")
|
||||
|
||||
set(CMAKE_C_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -qsourcetype=c)
|
||||
|
||||
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10.1)
|
||||
set(CMAKE_C90_STANDARD_COMPILE_OPTION "-qlanglvl=stdc89")
|
||||
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-qlanglvl=extc89")
|
||||
|
||||
@@ -6,8 +6,6 @@ string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
|
||||
# -qthreaded = Ensures that all optimizations will be thread-safe
|
||||
string(APPEND CMAKE_CXX_FLAGS_INIT " -qthreaded")
|
||||
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -+)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.1)
|
||||
if(CMAKE_SYSTEM MATCHES "Linux")
|
||||
set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "")
|
||||
@@ -34,3 +32,6 @@ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.1)
|
||||
endif ()
|
||||
|
||||
__compiler_check_default_language_standard(CXX 10.1 98)
|
||||
|
||||
set(CMAKE_CXX_COMPILE_OBJECT
|
||||
"<CMAKE_CXX_COMPILER> -+ <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>")
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
include(Compiler/XLClang)
|
||||
__compiler_xlclang(C)
|
||||
|
||||
set(CMAKE_C_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c)
|
||||
|
||||
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.1)
|
||||
set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89")
|
||||
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu89")
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
include(Compiler/XLClang)
|
||||
__compiler_xlclang(CXX)
|
||||
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.1)
|
||||
set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "")
|
||||
set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "")
|
||||
|
||||
+10
-2
@@ -64,8 +64,12 @@ else ()
|
||||
add_library(GLUT::Cocoa UNKNOWN IMPORTED)
|
||||
# Cocoa should always be a Framework, but we check to make sure.
|
||||
if(GLUT_cocoa_LIBRARY MATCHES "/([^/]+)\\.framework$")
|
||||
set(_glut_cocoa "${GLUT_cocoa_LIBRARY}/${CMAKE_MATCH_1}")
|
||||
if(EXISTS "${_glut_cocoa}.tbd")
|
||||
string(APPEND _glut_cocoa ".tbd")
|
||||
endif()
|
||||
set_target_properties(GLUT::Cocoa PROPERTIES
|
||||
IMPORTED_LOCATION "${GLUT_cocoa_LIBRARY}/${CMAKE_MATCH_1}")
|
||||
IMPORTED_LOCATION "${_glut_cocoa}")
|
||||
else()
|
||||
set_target_properties(GLUT::Cocoa PROPERTIES
|
||||
IMPORTED_LOCATION "${GLUT_cocoa_LIBRARY}")
|
||||
@@ -146,8 +150,12 @@ if (GLUT_FOUND)
|
||||
set_target_properties(GLUT::GLUT PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GLUT_INCLUDE_DIR}")
|
||||
if(GLUT_glut_LIBRARY MATCHES "/([^/]+)\\.framework$")
|
||||
set(_glut_glut "${GLUT_glut_LIBRARY}/${CMAKE_MATCH_1}")
|
||||
if(EXISTS "${_glut_glut}.tbd")
|
||||
string(APPEND _glut_glut ".tbd")
|
||||
endif()
|
||||
set_target_properties(GLUT::GLUT PROPERTIES
|
||||
IMPORTED_LOCATION "${GLUT_glut_LIBRARY}/${CMAKE_MATCH_1}")
|
||||
IMPORTED_LOCATION "${_glut_glut}")
|
||||
else()
|
||||
if(GLUT_glut_LIBRARY_RELEASE)
|
||||
set_property(TARGET GLUT::GLUT APPEND PROPERTY
|
||||
|
||||
+12
-28
@@ -96,27 +96,6 @@ function(__gtest_find_library _name)
|
||||
mark_as_advanced(${_name})
|
||||
endfunction()
|
||||
|
||||
function(__gtest_find_library_configuration _name _lib _cfg_suffix)
|
||||
set(_libs ${_lib})
|
||||
if(MSVC AND GTEST_MSVC_SEARCH STREQUAL "MD")
|
||||
# The provided /MD project files for Google Test add -md suffixes to the
|
||||
# library names.
|
||||
list(INSERT _libs 0 ${_lib}-md)
|
||||
endif()
|
||||
list(TRANSFORM _libs APPEND "${_cfg_suffix}")
|
||||
|
||||
__gtest_find_library(${_name} ${_libs})
|
||||
endfunction()
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
|
||||
function(__gtest_find_and_select_library_configurations _basename _lib)
|
||||
__gtest_find_library_configuration(${_basename}_LIBRARY_RELEASE ${_lib} "")
|
||||
__gtest_find_library_configuration(${_basename}_LIBRARY_DEBUG ${_lib} "d")
|
||||
|
||||
select_library_configurations(${_basename})
|
||||
set(${_basename}_LIBRARY ${${_basename}_LIBRARY} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
macro(__gtest_determine_windows_library_type _var)
|
||||
if(EXISTS "${${_var}}")
|
||||
file(TO_NATIVE_PATH "${${_var}}" _lib_path)
|
||||
@@ -208,13 +187,18 @@ find_path(GTEST_INCLUDE_DIR gtest/gtest.h
|
||||
)
|
||||
mark_as_advanced(GTEST_INCLUDE_DIR)
|
||||
|
||||
# Allow GTEST_LIBRARY and GTEST_MAIN_LIBRARY to be set manually, as the
|
||||
# locations of the gtest and gtest_main libraries, respectively.
|
||||
if(NOT GTEST_LIBRARY)
|
||||
__gtest_find_and_select_library_configurations(GTEST gtest)
|
||||
endif()
|
||||
if(NOT GTEST_MAIN_LIBRARY)
|
||||
__gtest_find_and_select_library_configurations(GTEST_MAIN gtest_main)
|
||||
if(MSVC AND GTEST_MSVC_SEARCH STREQUAL "MD")
|
||||
# The provided /MD project files for Google Test add -md suffixes to the
|
||||
# library names.
|
||||
__gtest_find_library(GTEST_LIBRARY gtest-md gtest)
|
||||
__gtest_find_library(GTEST_LIBRARY_DEBUG gtest-mdd gtestd)
|
||||
__gtest_find_library(GTEST_MAIN_LIBRARY gtest_main-md gtest_main)
|
||||
__gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_main-mdd gtest_maind)
|
||||
else()
|
||||
__gtest_find_library(GTEST_LIBRARY gtest)
|
||||
__gtest_find_library(GTEST_LIBRARY_DEBUG gtestd)
|
||||
__gtest_find_library(GTEST_MAIN_LIBRARY gtest_main)
|
||||
__gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_maind)
|
||||
endif()
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
|
||||
@@ -1026,7 +1026,7 @@ if (HDF5_FOUND)
|
||||
# Error if we still don't have the location.
|
||||
message(SEND_ERROR
|
||||
"HDF5 was found, but a different variable was set which contains "
|
||||
"its location.")
|
||||
"the location of the `hdf5::${hdf5_target_name}` library.")
|
||||
endif ()
|
||||
add_library("hdf5::${hdf5_target_name}" UNKNOWN IMPORTED)
|
||||
string(REPLACE "-D" "" _hdf5_definitions "${HDF5_${hdf5_lang}_DEFINITIONS}")
|
||||
@@ -1057,12 +1057,14 @@ if (HDF5_FOUND)
|
||||
continue ()
|
||||
endif ()
|
||||
|
||||
set(hdf5_alt_target_name "")
|
||||
if (hdf5_lang STREQUAL "C")
|
||||
set(hdf5_target_name "hdf5_hl")
|
||||
elseif (hdf5_lang STREQUAL "CXX")
|
||||
set(hdf5_target_name "hdf5_hl_cpp")
|
||||
elseif (hdf5_lang STREQUAL "Fortran")
|
||||
set(hdf5_target_name "hdf5_hl_fortran")
|
||||
set(hdf5_alt_target_name "hdf5hl_fortran")
|
||||
else ()
|
||||
continue ()
|
||||
endif ()
|
||||
@@ -1081,11 +1083,13 @@ if (HDF5_FOUND)
|
||||
set(_hdf5_location "${HDF5_${hdf5_lang}_HL_LIBRARY}")
|
||||
elseif (DEFINED "HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}")
|
||||
set(_hdf5_location "${HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}}")
|
||||
elseif (hdf5_alt_target_name AND DEFINED "HDF5_${hdf5_lang}_LIBRARY_${hdf5_alt_target_name}")
|
||||
set(_hdf5_location "${HDF5_${hdf5_lang}_LIBRARY_${hdf5_alt_target_name}}")
|
||||
else ()
|
||||
# Error if we still don't have the location.
|
||||
message(SEND_ERROR
|
||||
"HDF5 was found, but a different variable was set which contains "
|
||||
"its location.")
|
||||
"the location of the `hdf5::${hdf5_target_name}` library.")
|
||||
endif ()
|
||||
add_library("hdf5::${hdf5_target_name}" UNKNOWN IMPORTED)
|
||||
string(REPLACE "-D" "" _hdf5_definitions "${HDF5_${hdf5_lang}_HL_DEFINITIONS}")
|
||||
|
||||
@@ -275,8 +275,10 @@ function(FIND_PACKAGE_CHECK_VERSION version result)
|
||||
unset (${FPCV_RESULT_MESSAGE_VARIABLE} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
if (CMAKE_FIND_PACKAGE_NAME)
|
||||
set (package ${CMAKE_FIND_PACKAGE_NAME})
|
||||
if (_CMAKE_FPHSA_PACKAGE_NAME)
|
||||
set (package "${_CMAKE_FPHSA_PACKAGE_NAME}")
|
||||
elseif (CMAKE_FIND_PACKAGE_NAME)
|
||||
set (package "${CMAKE_FIND_PACKAGE_NAME}")
|
||||
else()
|
||||
message (FATAL_ERROR "find_package_check_version(): Cannot be used outside a 'Find Module'")
|
||||
endif()
|
||||
@@ -436,6 +438,9 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
|
||||
"will be used.")
|
||||
endif()
|
||||
|
||||
# to propagate package name to FIND_PACKAGE_CHECK_VERSION
|
||||
set(_CMAKE_FPHSA_PACKAGE_NAME "${_NAME}")
|
||||
|
||||
# now that we collected all arguments, process them
|
||||
|
||||
if("x${FPHSA_FAIL_MESSAGE}" STREQUAL "xDEFAULT_MSG")
|
||||
|
||||
@@ -453,7 +453,11 @@ function (_PYTHON_GET_CONFIG_VAR _PYTHON_PGCV_VALUE NAME)
|
||||
list (REMOVE_DUPLICATES _values)
|
||||
elseif (NAME STREQUAL "SOABI")
|
||||
# clean-up: remove prefix character and suffix
|
||||
string (REGEX REPLACE "^[.-](.+)(${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.(so|pyd))$" "\\1" _values "${_values}")
|
||||
if (_values MATCHES "^(\\.${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.so|\\.pyd)$")
|
||||
set(_values "")
|
||||
else()
|
||||
string (REGEX REPLACE "^[.-](.+)(${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.(so|pyd))$" "\\1" _values "${_values}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -505,7 +509,11 @@ function (_PYTHON_GET_CONFIG_VAR _PYTHON_PGCV_VALUE NAME)
|
||||
endforeach()
|
||||
if (_values)
|
||||
# clean-up: remove prefix character and suffix
|
||||
string (REGEX REPLACE "^[.-](.+)(${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.(so|pyd))$" "\\1" _values "${_values}")
|
||||
if (_values MATCHES "^(\\.${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.so|\\.pyd)$")
|
||||
set(_values "")
|
||||
else()
|
||||
string (REGEX REPLACE "^[.-](.+)(${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.(so|pyd))$" "\\1" _values "${_values}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
|
||||
+3
-3
@@ -6,13 +6,13 @@
|
||||
NOTE: This function is used internally by CMake. Projects should not include
|
||||
this file directly.
|
||||
|
||||
The cmake_check_compiler_flag() function can be used to compile and link a
|
||||
The cmake_try_compiler_or_linker_flag() function can be used to compile and link a
|
||||
source file to check whether a specific compiler or linker flag is supported.
|
||||
The function does not use the try_compile() command so as to avoid infinite
|
||||
recursion. It may not work for all platforms or toolchains, the caller is
|
||||
responsible for ensuring it is only called in valid situations.
|
||||
|
||||
cmake_check_compiler_flag(<lang> <flag> <result>
|
||||
cmake_try_compiler_or_linker_flag(<lang> <flag> <result>
|
||||
[SRC_EXT <ext>] [COMMAND_PATTERN <pattern>]
|
||||
[FAIL_REGEX <regex> ...]
|
||||
[OUTPUT_VARIABLE <output>])
|
||||
@@ -39,7 +39,7 @@ Optional parameters:
|
||||
include_guard(GLOBAL)
|
||||
include(CMakeCheckCompilerFlagCommonPatterns)
|
||||
|
||||
function(CMAKE_CHECK_COMPILER_FLAG lang flag result)
|
||||
function(CMAKE_TRY_COMPILER_OR_LINKER_FLAG lang flag result)
|
||||
# Cache results between runs similar to check_<lang>_source_compiles()
|
||||
if(DEFINED ${result})
|
||||
return()
|
||||
@@ -11,20 +11,20 @@ cmake_policy(SET CMP0057 NEW) # if() supports IN_LIST
|
||||
|
||||
function(CMAKE_CHECK_COMPILER_FLAG _lang _flag _var)
|
||||
|
||||
if(_lang STREQUAL C)
|
||||
if(_lang STREQUAL "C")
|
||||
set(_lang_src "int main(void) { return 0; }")
|
||||
set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for C")
|
||||
elseif(_lang STREQUAL CXX)
|
||||
elseif(_lang STREQUAL "CXX")
|
||||
set(_lang_src "int main() { return 0; }")
|
||||
set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for C\\+\\+")
|
||||
elseif(_lang STREQUAL CUDA)
|
||||
elseif(_lang STREQUAL "CUDA")
|
||||
set(_lang_src "__host__ int main() { return 0; }")
|
||||
set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for C\\+\\+" # Host GNU
|
||||
FAIL_REGEX "argument unused during compilation: .*") # Clang
|
||||
elseif(_lang STREQUAL Fortran)
|
||||
elseif(_lang STREQUAL "Fortran")
|
||||
set(_lang_src " program test\n stop\n end program")
|
||||
set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for Fortran")
|
||||
elseif(_lang STREQUAL OBJC)
|
||||
elseif(_lang STREQUAL "OBJC")
|
||||
set(_lang_src [=[
|
||||
#ifndef __OBJC__
|
||||
# error "Not an Objective-C compiler"
|
||||
@@ -32,7 +32,7 @@ function(CMAKE_CHECK_COMPILER_FLAG _lang _flag _var)
|
||||
int main(void) { return 0; }]=])
|
||||
set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for Objective-C" # GNU
|
||||
FAIL_REGEX "argument unused during compilation: .*") # Clang
|
||||
elseif(_lang STREQUAL OBJCXX)
|
||||
elseif(_lang STREQUAL "OBJCXX")
|
||||
set(_lang_src [=[
|
||||
#ifndef __OBJC__
|
||||
# error "Not an Objective-C++ compiler"
|
||||
@@ -40,7 +40,7 @@ int main(void) { return 0; }]=])
|
||||
int main(void) { return 0; }]=])
|
||||
set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for Objective-C\\+\\+" # GNU
|
||||
FAIL_REGEX "argument unused during compilation: .*") # Clang
|
||||
elseif(_lang STREQUAL ISPC)
|
||||
elseif(_lang STREQUAL "ISPC")
|
||||
set(_lang_src "float func(uniform int32, float a) { return a / 2.25; }")
|
||||
else()
|
||||
message (SEND_ERROR "check_compiler_flag: ${_lang}: unknown language.")
|
||||
|
||||
@@ -10,25 +10,25 @@ cmake_policy(SET CMP0057 NEW) # if() supports IN_LIST
|
||||
function(CMAKE_CHECK_SOURCE_COMPILES _lang _source _var)
|
||||
if(NOT DEFINED "${_var}")
|
||||
|
||||
if(_lang STREQUAL C)
|
||||
if(_lang STREQUAL "C")
|
||||
set(_lang_textual "C")
|
||||
set(_lang_ext "c")
|
||||
elseif(_lang STREQUAL CXX)
|
||||
elseif(_lang STREQUAL "CXX")
|
||||
set(_lang_textual "C++")
|
||||
set(_lang_ext "cxx")
|
||||
elseif(_lang STREQUAL CUDA)
|
||||
elseif(_lang STREQUAL "CUDA")
|
||||
set(_lang_textual "CUDA")
|
||||
set(_lang_ext "cu")
|
||||
elseif(_lang STREQUAL Fortran)
|
||||
elseif(_lang STREQUAL "Fortran")
|
||||
set(_lang_textual "Fortran")
|
||||
set(_lang_ext "F90")
|
||||
elseif(_lang STREQUAL ISPC)
|
||||
elseif(_lang STREQUAL "ISPC")
|
||||
set(_lang_textual "ISPC")
|
||||
set(_lang_ext "ispc")
|
||||
elseif(_lang STREQUAL OBJC)
|
||||
elseif(_lang STREQUAL "OBJC")
|
||||
set(_lang_textual "Objective-C")
|
||||
set(_lang_ext "m")
|
||||
elseif(_lang STREQUAL OBJCXX)
|
||||
elseif(_lang STREQUAL "OBJCXX")
|
||||
set(_lang_textual "Objective-C++")
|
||||
set(_lang_ext "mm")
|
||||
else()
|
||||
|
||||
@@ -10,22 +10,22 @@ cmake_policy(SET CMP0057 NEW) # if() supports IN_LIST
|
||||
function(CMAKE_CHECK_SOURCE_RUNS _lang _source _var)
|
||||
if(NOT DEFINED "${_var}")
|
||||
|
||||
if(_lang STREQUAL C)
|
||||
if(_lang STREQUAL "C")
|
||||
set(_lang_textual "C")
|
||||
set(_lang_ext "c")
|
||||
elseif(_lang STREQUAL CXX)
|
||||
elseif(_lang STREQUAL "CXX")
|
||||
set(_lang_textual "C++")
|
||||
set(_lang_ext "cxx")
|
||||
elseif(_lang STREQUAL CUDA)
|
||||
elseif(_lang STREQUAL "CUDA")
|
||||
set(_lang_textual "CUDA")
|
||||
set(_lang_ext "cu")
|
||||
elseif(_lang STREQUAL Fortran)
|
||||
elseif(_lang STREQUAL "Fortran")
|
||||
set(_lang_textual "Fortran")
|
||||
set(_lang_ext "F90")
|
||||
elseif(_lang STREQUAL OBJC)
|
||||
elseif(_lang STREQUAL "OBJC")
|
||||
set(_lang_textual "Objective-C")
|
||||
set(_lang_ext "m")
|
||||
elseif(_lang STREQUAL OBJCXX)
|
||||
elseif(_lang STREQUAL "OBJCXX")
|
||||
set(_lang_textual "Objective-C++")
|
||||
set(_lang_ext "mm")
|
||||
else()
|
||||
|
||||
@@ -22,13 +22,22 @@ set(CMAKE_OSX_ARCHITECTURES "$ENV{CMAKE_OSX_ARCHITECTURES}" CACHE STRING
|
||||
|
||||
if(NOT CMAKE_CROSSCOMPILING AND
|
||||
CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND
|
||||
CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64" AND
|
||||
CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
|
||||
# When building on Apple Silicon (arm64), we need to explicitly specify
|
||||
CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(arm64|x86_64)$")
|
||||
execute_process(COMMAND sysctl -q hw.optional.arm64
|
||||
OUTPUT_VARIABLE _sysctl_stdout
|
||||
ERROR_VARIABLE _sysctl_stderr
|
||||
RESULT_VARIABLE _sysctl_result
|
||||
)
|
||||
# When building on an Apple Silicon host, we need to explicitly specify
|
||||
# the architecture to the toolchain since it will otherwise guess the
|
||||
# architecture based on that of the build system tool.
|
||||
# Set an *internal variable* to tell the generators to do this.
|
||||
set(_CMAKE_APPLE_ARCHS_DEFAULT "arm64")
|
||||
if(_sysctl_result EQUAL 0 AND _sysctl_stdout MATCHES "hw.optional.arm64: 1")
|
||||
set(_CMAKE_APPLE_ARCHS_DEFAULT "${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
||||
endif()
|
||||
unset(_sysctl_result)
|
||||
unset(_sysctl_stderr)
|
||||
unset(_sysctl_stdout)
|
||||
endif()
|
||||
|
||||
# macOS, iOS, tvOS, and watchOS should lookup compilers from
|
||||
|
||||
@@ -216,6 +216,13 @@ set(CMAKE_SYSTEM_APPBUNDLE_PATH
|
||||
unset(_apps_paths)
|
||||
|
||||
include(Platform/UnixPaths)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
|
||||
list(PREPEND CMAKE_SYSTEM_PREFIX_PATH
|
||||
/opt/homebrew # Brew on Apple Silicon
|
||||
)
|
||||
endif()
|
||||
|
||||
if(_CMAKE_OSX_SYSROOT_PATH)
|
||||
if(EXISTS ${_CMAKE_OSX_SYSROOT_PATH}/usr/include)
|
||||
list(INSERT CMAKE_SYSTEM_PREFIX_PATH 0 ${_CMAKE_OSX_SYSROOT_PATH}/usr)
|
||||
|
||||
@@ -35,6 +35,9 @@ macro(__windows_compiler_clang_gnu lang)
|
||||
set(CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS 1)
|
||||
set (CMAKE_LINK_DEF_FILE_FLAG "-Xlinker /DEF:")
|
||||
|
||||
set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Xlinker" " ")
|
||||
set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP)
|
||||
|
||||
if("${CMAKE_${lang}_SIMULATE_VERSION}" MATCHES "^([0-9]+)\\.([0-9]+)")
|
||||
math(EXPR MSVC_VERSION "${CMAKE_MATCH_1}*100 + ${CMAKE_MATCH_2}")
|
||||
endif()
|
||||
@@ -102,7 +105,7 @@ macro(__windows_compiler_clang_gnu lang)
|
||||
enable_language(RC)
|
||||
endmacro()
|
||||
|
||||
macro(__enable_llvm_rc_preprocessing clang_option_prefix)
|
||||
macro(__enable_llvm_rc_preprocessing clang_option_prefix extra_pp_flags)
|
||||
# Feed the preprocessed rc file to llvm-rc
|
||||
if(CMAKE_RC_COMPILER_INIT MATCHES "llvm-rc" OR CMAKE_RC_COMPILER MATCHES "llvm-rc")
|
||||
if(DEFINED CMAKE_C_COMPILER_ID)
|
||||
@@ -112,7 +115,7 @@ macro(__enable_llvm_rc_preprocessing clang_option_prefix)
|
||||
endif()
|
||||
if(DEFINED CMAKE_RC_PREPROCESSOR)
|
||||
set(CMAKE_DEPFILE_FLAGS_RC "${clang_option_prefix}-MD ${clang_option_prefix}-MF ${clang_option_prefix}<DEPFILE>")
|
||||
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_COMMAND> -E cmake_llvm_rc <SOURCE> <OBJECT>.pp <${CMAKE_RC_PREPROCESSOR}> <DEFINES> -DRC_INVOKED <INCLUDES> <FLAGS> -E -- <SOURCE> ++ <CMAKE_RC_COMPILER> <DEFINES> -I <SOURCE_DIR> <INCLUDES> /fo <OBJECT> <OBJECT>.pp")
|
||||
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_COMMAND> -E cmake_llvm_rc <SOURCE> <OBJECT>.pp <${CMAKE_RC_PREPROCESSOR}> <DEFINES> -DRC_INVOKED <INCLUDES> <FLAGS> ${extra_pp_flags} -E -- <SOURCE> ++ <CMAKE_RC_COMPILER> <DEFINES> -I <SOURCE_DIR> <INCLUDES> /fo <OBJECT> <OBJECT>.pp")
|
||||
if(CMAKE_GENERATOR MATCHES "Ninja")
|
||||
set(CMAKE_NINJA_CMCLDEPS_RC 0)
|
||||
set(CMAKE_NINJA_DEP_TYPE_RC gcc)
|
||||
@@ -162,7 +165,7 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
|
||||
if ( "x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC" OR "x${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC" )
|
||||
include(Platform/Windows-MSVC)
|
||||
# Set the clang option forwarding prefix for clang-cl usage in the llvm-rc processing stage
|
||||
__enable_llvm_rc_preprocessing("-clang:")
|
||||
__enable_llvm_rc_preprocessing("-clang:" "")
|
||||
macro(__windows_compiler_clang_base lang)
|
||||
set(_COMPILE_${lang} "${_COMPILE_${lang}_MSVC}")
|
||||
__windows_compiler_msvc(${lang})
|
||||
@@ -178,7 +181,7 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
|
||||
|
||||
set(CMAKE_BUILD_TYPE_INIT Debug)
|
||||
|
||||
__enable_llvm_rc_preprocessing("")
|
||||
__enable_llvm_rc_preprocessing("" "-x c")
|
||||
macro(__windows_compiler_clang_base lang)
|
||||
__windows_compiler_clang_gnu(${lang})
|
||||
endmacro()
|
||||
@@ -186,7 +189,7 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
|
||||
|
||||
else()
|
||||
include(Platform/Windows-GNU)
|
||||
__enable_llvm_rc_preprocessing("")
|
||||
__enable_llvm_rc_preprocessing("" "-x c")
|
||||
macro(__windows_compiler_clang_base lang)
|
||||
__windows_compiler_gnu(${lang})
|
||||
endmacro()
|
||||
|
||||
@@ -2,9 +2,12 @@
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
# To ensure maximum portability across various compilers and platforms
|
||||
# deactivate any compiler extensions
|
||||
set(CMAKE_C_EXTENSIONS FALSE)
|
||||
set(CMAKE_CXX_EXTENSIONS FALSE)
|
||||
# deactivate any compiler extensions. Skip this for QNX, where additional
|
||||
# work is needed to build without compiler extensions.
|
||||
if (NOT CMAKE_SYSTEM_NAME STREQUAL "QNX")
|
||||
set(CMAKE_C_EXTENSIONS FALSE)
|
||||
set(CMAKE_CXX_EXTENSIONS FALSE)
|
||||
endif()
|
||||
|
||||
include(CheckIncludeFile)
|
||||
# Check if we can build support for ELF parsing.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# CMake version number components.
|
||||
set(CMake_VERSION_MAJOR 3)
|
||||
set(CMake_VERSION_MINOR 19)
|
||||
set(CMake_VERSION_PATCH 0)
|
||||
set(CMake_VERSION_PATCH 2)
|
||||
#set(CMake_VERSION_RC 0)
|
||||
set(CMake_VERSION_IS_DIRTY 0)
|
||||
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
|
||||
// FIXME: Port to QFileSystemModel from the deprecated QDirModel.
|
||||
// Be sure completion works when incrementally editing existing paths.
|
||||
#define QT_DEPRECATED_WARNINGS_SINCE QT_VERSION_CHECK(5, 14, 0)
|
||||
|
||||
#include "QCMakeWidgets.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <QDirModel>
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
#include <QFileSystemModel>
|
||||
#include <QResizeEvent>
|
||||
#include <QToolButton>
|
||||
|
||||
@@ -88,20 +93,20 @@ void QCMakePathEditor::chooseFile()
|
||||
}
|
||||
}
|
||||
|
||||
// use same QFileSystemModel for all completers
|
||||
static QFileSystemModel* fileDirModel()
|
||||
// use same QDirModel for all completers
|
||||
static QDirModel* fileDirModel()
|
||||
{
|
||||
static QFileSystemModel* m = nullptr;
|
||||
static QDirModel* m = nullptr;
|
||||
if (!m) {
|
||||
m = new QFileSystemModel();
|
||||
m = new QDirModel();
|
||||
}
|
||||
return m;
|
||||
}
|
||||
static QFileSystemModel* pathDirModel()
|
||||
static QDirModel* pathDirModel()
|
||||
{
|
||||
static QFileSystemModel* m = nullptr;
|
||||
static QDirModel* m = nullptr;
|
||||
if (!m) {
|
||||
m = new QFileSystemModel();
|
||||
m = new QDirModel();
|
||||
m->setFilter(QDir::AllDirs | QDir::Drives | QDir::NoDotAndDotDot);
|
||||
}
|
||||
return m;
|
||||
@@ -110,7 +115,7 @@ static QFileSystemModel* pathDirModel()
|
||||
QCMakeFileCompleter::QCMakeFileCompleter(QObject* o, bool dirs)
|
||||
: QCompleter(o)
|
||||
{
|
||||
QFileSystemModel* m = dirs ? pathDirModel() : fileDirModel();
|
||||
QDirModel* m = dirs ? pathDirModel() : fileDirModel();
|
||||
this->setModel(m);
|
||||
}
|
||||
|
||||
|
||||
@@ -201,6 +201,7 @@ std::string const kCMAKE_CUDA_ARCHITECTURES = "CMAKE_CUDA_ARCHITECTURES";
|
||||
std::string const kCMAKE_CUDA_RUNTIME_LIBRARY = "CMAKE_CUDA_RUNTIME_LIBRARY";
|
||||
std::string const kCMAKE_ENABLE_EXPORTS = "CMAKE_ENABLE_EXPORTS";
|
||||
std::string const kCMAKE_ISPC_INSTRUCTION_SETS = "CMAKE_ISPC_INSTRUCTION_SETS";
|
||||
std::string const kCMAKE_ISPC_HEADER_SUFFIX = "CMAKE_ISPC_HEADER_SUFFIX";
|
||||
std::string const kCMAKE_LINK_SEARCH_END_STATIC =
|
||||
"CMAKE_LINK_SEARCH_END_STATIC";
|
||||
std::string const kCMAKE_LINK_SEARCH_START_STATIC =
|
||||
@@ -718,6 +719,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
|
||||
vars.insert(kCMAKE_CUDA_RUNTIME_LIBRARY);
|
||||
vars.insert(kCMAKE_ENABLE_EXPORTS);
|
||||
vars.insert(kCMAKE_ISPC_INSTRUCTION_SETS);
|
||||
vars.insert(kCMAKE_ISPC_HEADER_SUFFIX);
|
||||
vars.insert(kCMAKE_LINK_SEARCH_END_STATIC);
|
||||
vars.insert(kCMAKE_LINK_SEARCH_START_STATIC);
|
||||
vars.insert(kCMAKE_OSX_ARCHITECTURES);
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
#include <cctype> /* isspace */
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <cm/string_view>
|
||||
@@ -375,47 +377,101 @@ bool cmExecuteProcessCommand(std::vector<std::string> const& args,
|
||||
}
|
||||
}
|
||||
|
||||
auto queryProcessStatusByIndex = [&cp](int index) -> std::string {
|
||||
std::string processStatus;
|
||||
switch (cmsysProcess_GetStateByIndex(cp, static_cast<int>(index))) {
|
||||
case kwsysProcess_StateByIndex_Exited: {
|
||||
int exitCode = cmsysProcess_GetExitValueByIndex(cp, index);
|
||||
if (exitCode) {
|
||||
processStatus = "Child return code: " + std::to_string(exitCode);
|
||||
}
|
||||
} break;
|
||||
case kwsysProcess_StateByIndex_Exception: {
|
||||
processStatus = cmStrCat(
|
||||
"Abnormal exit with child return code: ",
|
||||
cmsysProcess_GetExceptionStringByIndex(cp, static_cast<int>(index)));
|
||||
break;
|
||||
}
|
||||
case kwsysProcess_StateByIndex_Error:
|
||||
default:
|
||||
processStatus = "Error getting the child return code";
|
||||
break;
|
||||
}
|
||||
return processStatus;
|
||||
};
|
||||
|
||||
if (arguments.CommandErrorIsFatal == "ANY"_s) {
|
||||
if (cmsysProcess_GetState(cp) == cmsysProcess_State_Exited) {
|
||||
std::vector<int> failedIndexes;
|
||||
for (int i = 0; i < static_cast<int>(arguments.Commands.size()); ++i) {
|
||||
if (cmsysProcess_GetStateByIndex(cp, i) ==
|
||||
kwsysProcess_StateByIndex_Exited) {
|
||||
int exitCode = cmsysProcess_GetExitValueByIndex(cp, i);
|
||||
if (exitCode) {
|
||||
failedIndexes.push_back(i);
|
||||
bool ret = true;
|
||||
switch (cmsysProcess_GetState(cp)) {
|
||||
case cmsysProcess_State_Exited: {
|
||||
std::map<int, std::string> failureIndices;
|
||||
for (int i = 0; i < static_cast<int>(arguments.Commands.size()); ++i) {
|
||||
std::string processStatus = queryProcessStatusByIndex(i);
|
||||
if (!processStatus.empty()) {
|
||||
failureIndices[i] = processStatus;
|
||||
}
|
||||
if (!failureIndices.empty()) {
|
||||
std::ostringstream oss;
|
||||
oss << "failed command indexes:\n";
|
||||
for (auto const& e : failureIndices) {
|
||||
oss << " " << e.first + 1 << ": \"" << e.second << "\"\n";
|
||||
}
|
||||
status.SetError(oss.str());
|
||||
ret = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!failedIndexes.empty()) {
|
||||
std::ostringstream oss;
|
||||
oss << "failed command indexes: ";
|
||||
for (auto i = 0u; i < failedIndexes.size(); i++) {
|
||||
if (i == failedIndexes.size() - 1) {
|
||||
oss << failedIndexes[i] + 1;
|
||||
} else {
|
||||
oss << failedIndexes[i] + 1 << ", ";
|
||||
}
|
||||
}
|
||||
status.SetError(oss.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
return false;
|
||||
}
|
||||
} break;
|
||||
case cmsysProcess_State_Exception:
|
||||
status.SetError(
|
||||
cmStrCat("abnormal exit: ", cmsysProcess_GetExceptionString(cp)));
|
||||
ret = false;
|
||||
break;
|
||||
case cmsysProcess_State_Error:
|
||||
status.SetError(cmStrCat("error getting child return code: ",
|
||||
cmsysProcess_GetErrorString(cp)));
|
||||
ret = false;
|
||||
break;
|
||||
case cmsysProcess_State_Expired:
|
||||
status.SetError("Process terminated due to timeout");
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ret) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (arguments.CommandErrorIsFatal == "LAST"_s) {
|
||||
if (cmsysProcess_GetState(cp) == cmsysProcess_State_Exited) {
|
||||
int lastIndex = static_cast<int>(arguments.Commands.size() - 1);
|
||||
if (cmsysProcess_GetStateByIndex(cp, lastIndex) ==
|
||||
kwsysProcess_StateByIndex_Exited) {
|
||||
int exitCode = cmsysProcess_GetExitValueByIndex(cp, lastIndex);
|
||||
if (exitCode) {
|
||||
bool ret = true;
|
||||
switch (cmsysProcess_GetState(cp)) {
|
||||
case cmsysProcess_State_Exited: {
|
||||
int lastIndex = static_cast<int>(arguments.Commands.size() - 1);
|
||||
const std::string processStatus = queryProcessStatusByIndex(lastIndex);
|
||||
if (!processStatus.empty()) {
|
||||
status.SetError("last command failed");
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
return false;
|
||||
ret = false;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case cmsysProcess_State_Exception:
|
||||
status.SetError(
|
||||
cmStrCat("Abnormal exit: ", cmsysProcess_GetExceptionString(cp)));
|
||||
ret = false;
|
||||
break;
|
||||
case cmsysProcess_State_Error:
|
||||
status.SetError(cmStrCat("Error getting child return code: ",
|
||||
cmsysProcess_GetErrorString(cp)));
|
||||
ret = false;
|
||||
break;
|
||||
case cmsysProcess_State_Expired:
|
||||
status.SetError("Process terminated due to timeout");
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
if (!ret) {
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -288,6 +288,9 @@ void cmExportBuildFileGenerator::GetTargets(
|
||||
if (this->ExportSet) {
|
||||
for (std::unique_ptr<cmTargetExport> const& te :
|
||||
this->ExportSet->GetTargetExports()) {
|
||||
if (te->NamelinkOnly) {
|
||||
continue;
|
||||
}
|
||||
targets.push_back(te->TargetName);
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -42,6 +42,9 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
|
||||
std::string sep;
|
||||
for (std::unique_ptr<cmTargetExport> const& te :
|
||||
this->IEGen->GetExportSet()->GetTargetExports()) {
|
||||
if (te->NamelinkOnly) {
|
||||
continue;
|
||||
}
|
||||
expectedTargets += sep + this->Namespace + te->Target->GetExportName();
|
||||
sep = " ";
|
||||
if (this->ExportedTargets.insert(te->Target).second) {
|
||||
|
||||
@@ -349,13 +349,6 @@ std::string cmExtraSublimeTextGenerator::ComputeFlagsForObject(
|
||||
if (language.empty()) {
|
||||
language = "C";
|
||||
}
|
||||
|
||||
// explicitly add the explicit language flag before any other flag
|
||||
// this way backwards compatibility with user flags is maintained
|
||||
if (source->GetProperty("LANGUAGE")) {
|
||||
lg->AppendFeatureOptions(flags, language, "EXPLICIT_LANGUAGE");
|
||||
}
|
||||
|
||||
std::string const& config =
|
||||
lg->GetMakefile()->GetSafeDefinition("CMAKE_BUILD_TYPE");
|
||||
|
||||
|
||||
@@ -24,13 +24,13 @@ bool cmFileTime::Load(std::string const& fileName)
|
||||
}
|
||||
# if CMake_STAT_HAS_ST_MTIM
|
||||
// Nanosecond resolution
|
||||
this->NS = fst.st_mtim.tv_sec * NsPerS + fst.st_mtim.tv_nsec;
|
||||
this->Time = fst.st_mtim.tv_sec * UtPerS + fst.st_mtim.tv_nsec;
|
||||
# elif CMake_STAT_HAS_ST_MTIMESPEC
|
||||
// Nanosecond resolution
|
||||
this->NS = fst.st_mtimespec.tv_sec * NsPerS + fst.st_mtimespec.tv_nsec;
|
||||
this->Time = fst.st_mtimespec.tv_sec * UtPerS + fst.st_mtimespec.tv_nsec;
|
||||
# else
|
||||
// Second resolution
|
||||
this->NS = fst.st_mtime * NsPerS;
|
||||
this->Time = fst.st_mtime * UtPerS;
|
||||
# endif
|
||||
#else
|
||||
// Windows version. Get the modification time from extended file attributes.
|
||||
@@ -41,10 +41,11 @@ bool cmFileTime::Load(std::string const& fileName)
|
||||
}
|
||||
|
||||
// Copy the file time to the output location.
|
||||
this->NS = (static_cast<NSC>(fdata.ftLastWriteTime.dwHighDateTime) << 32) |
|
||||
static_cast<NSC>(fdata.ftLastWriteTime.dwLowDateTime);
|
||||
// The file time resolution is 100 ns.
|
||||
this->NS *= 100;
|
||||
using uint64 = unsigned long long;
|
||||
|
||||
this->Time = static_cast<TimeType>(
|
||||
(uint64(fdata.ftLastWriteTime.dwHighDateTime) << 32) +
|
||||
fdata.ftLastWriteTime.dwLowDateTime);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
+32
-20
@@ -13,9 +13,15 @@
|
||||
class cmFileTime
|
||||
{
|
||||
public:
|
||||
using NSC = long long;
|
||||
static constexpr NSC NsPerS = 1000000000;
|
||||
|
||||
using TimeType = long long;
|
||||
// unit time per second
|
||||
#if !defined(_WIN32) || defined(__CYGWIN__)
|
||||
// unit time is one nanosecond
|
||||
static constexpr TimeType UtPerS = 1000000000;
|
||||
#else
|
||||
// unit time is 100 nanosecond
|
||||
static constexpr TimeType UtPerS = 10000000;
|
||||
#endif
|
||||
cmFileTime() = default;
|
||||
~cmFileTime() = default;
|
||||
|
||||
@@ -28,22 +34,28 @@ public:
|
||||
/**
|
||||
* @brief Return true if this is older than ftm
|
||||
*/
|
||||
bool Older(cmFileTime const& ftm) const { return (this->NS - ftm.NS) < 0; }
|
||||
bool Older(cmFileTime const& ftm) const
|
||||
{
|
||||
return (this->Time - ftm.Time) < 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return true if this is newer than ftm
|
||||
*/
|
||||
bool Newer(cmFileTime const& ftm) const { return (ftm.NS - this->NS) < 0; }
|
||||
bool Newer(cmFileTime const& ftm) const
|
||||
{
|
||||
return (ftm.Time - this->Time) < 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return true if this is the same as ftm
|
||||
*/
|
||||
bool Equal(cmFileTime const& ftm) const { return this->NS == ftm.NS; }
|
||||
bool Equal(cmFileTime const& ftm) const { return this->Time == ftm.Time; }
|
||||
|
||||
/**
|
||||
* @brief Return true if this is not the same as ftm
|
||||
*/
|
||||
bool Differ(cmFileTime const& ftm) const { return this->NS != ftm.NS; }
|
||||
bool Differ(cmFileTime const& ftm) const { return this->Time != ftm.Time; }
|
||||
|
||||
/**
|
||||
* @brief Compare file modification times.
|
||||
@@ -51,7 +63,7 @@ public:
|
||||
*/
|
||||
int Compare(cmFileTime const& ftm) const
|
||||
{
|
||||
NSC const diff = this->NS - ftm.NS;
|
||||
TimeType const diff = this->Time - ftm.Time;
|
||||
if (diff == 0) {
|
||||
return 0;
|
||||
}
|
||||
@@ -65,7 +77,7 @@ public:
|
||||
*/
|
||||
bool OlderS(cmFileTime const& ftm) const
|
||||
{
|
||||
return (ftm.NS - this->NS) >= cmFileTime::NsPerS;
|
||||
return (ftm.Time - this->Time) >= cmFileTime::UtPerS;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -73,7 +85,7 @@ public:
|
||||
*/
|
||||
bool NewerS(cmFileTime const& ftm) const
|
||||
{
|
||||
return (this->NS - ftm.NS) >= cmFileTime::NsPerS;
|
||||
return (this->Time - ftm.Time) >= cmFileTime::UtPerS;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,11 +93,11 @@ public:
|
||||
*/
|
||||
bool EqualS(cmFileTime const& ftm) const
|
||||
{
|
||||
NSC diff = this->NS - ftm.NS;
|
||||
TimeType diff = this->Time - ftm.Time;
|
||||
if (diff < 0) {
|
||||
diff = -diff;
|
||||
}
|
||||
return (diff < cmFileTime::NsPerS);
|
||||
return (diff < cmFileTime::UtPerS);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,11 +105,11 @@ public:
|
||||
*/
|
||||
bool DifferS(cmFileTime const& ftm) const
|
||||
{
|
||||
NSC diff = this->NS - ftm.NS;
|
||||
TimeType diff = this->Time - ftm.Time;
|
||||
if (diff < 0) {
|
||||
diff = -diff;
|
||||
}
|
||||
return (diff >= cmFileTime::NsPerS);
|
||||
return (diff >= cmFileTime::UtPerS);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -107,21 +119,21 @@ public:
|
||||
*/
|
||||
int CompareS(cmFileTime const& ftm) const
|
||||
{
|
||||
NSC const diff = this->NS - ftm.NS;
|
||||
if (diff <= -cmFileTime::NsPerS) {
|
||||
TimeType const diff = this->Time - ftm.Time;
|
||||
if (diff <= -cmFileTime::UtPerS) {
|
||||
return -1;
|
||||
}
|
||||
if (diff >= cmFileTime::NsPerS) {
|
||||
if (diff >= cmFileTime::UtPerS) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The file modification time in nanoseconds
|
||||
* @brief The file modification time in unit time per second
|
||||
*/
|
||||
NSC GetNS() const { return this->NS; }
|
||||
TimeType GetTime() const { return this->Time; }
|
||||
|
||||
private:
|
||||
NSC NS = 0;
|
||||
TimeType Time = 0;
|
||||
};
|
||||
|
||||
@@ -5107,9 +5107,14 @@ void cmGeneratorTarget::GetTargetObjectNames(
|
||||
objects.push_back(map_it->second);
|
||||
}
|
||||
|
||||
// We need to compute the relative path from the root of
|
||||
// of the object directory to handle subdirectory paths
|
||||
std::string rootObjectDir = this->GetObjectDirectory(config);
|
||||
rootObjectDir = cmSystemTools::CollapseFullPath(rootObjectDir);
|
||||
auto ispcObjects = this->GetGeneratedISPCObjects(config);
|
||||
for (std::string const& output : ispcObjects) {
|
||||
objects.push_back(cmSystemTools::GetFilenameName(output));
|
||||
auto relativePathFromObjectDir = output.substr(rootObjectDir.size());
|
||||
objects.push_back(relativePathFromObjectDir);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -584,7 +584,8 @@ void cmGlobalGenerator::EnableLanguage(
|
||||
// Find the native build tool for this generator.
|
||||
// This has to be done early so that MSBuild can be used to examine the
|
||||
// cross-compilation environment.
|
||||
if (!this->FindMakeProgram(mf)) {
|
||||
if (this->GetFindMakeProgramStage() == FindMakeProgramStage::Early &&
|
||||
!this->FindMakeProgram(mf)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -660,6 +661,12 @@ void cmGlobalGenerator::EnableLanguage(
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
return;
|
||||
}
|
||||
|
||||
// Find the native build tool for this generator.
|
||||
if (this->GetFindMakeProgramStage() == FindMakeProgramStage::Late &&
|
||||
!this->FindMakeProgram(mf)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Check that the languages are supported by the generator and its
|
||||
|
||||
@@ -597,6 +597,17 @@ protected:
|
||||
|
||||
std::string GetPredefinedTargetsFolder();
|
||||
|
||||
enum class FindMakeProgramStage
|
||||
{
|
||||
Early,
|
||||
Late,
|
||||
};
|
||||
|
||||
virtual FindMakeProgramStage GetFindMakeProgramStage() const
|
||||
{
|
||||
return FindMakeProgramStage::Late;
|
||||
}
|
||||
|
||||
private:
|
||||
using TargetMap = std::unordered_map<std::string, cmTarget*>;
|
||||
using GeneratorTargetMap =
|
||||
|
||||
@@ -539,10 +539,11 @@ void cmGlobalNinjaGenerator::Generate()
|
||||
this->CloseBuildFileStreams();
|
||||
|
||||
#ifdef _WIN32
|
||||
// The ninja tools will not be able to update metadata on Windows
|
||||
// Older ninja tools will not be able to update metadata on Windows
|
||||
// when we are re-generating inside an existing 'ninja' invocation
|
||||
// because the outer tool has the files open for write.
|
||||
if (!this->GetCMakeInstance()->GetRegenerateDuringBuild())
|
||||
if (this->NinjaSupportsMetadataOnRegeneration ||
|
||||
!this->GetCMakeInstance()->GetRegenerateDuringBuild())
|
||||
#endif
|
||||
{
|
||||
this->CleanMetaData();
|
||||
@@ -580,18 +581,9 @@ void cmGlobalNinjaGenerator::CleanMetaData()
|
||||
|
||||
// Skip some ninja tools if they need 'build.ninja' but it is missing.
|
||||
bool const missingBuildManifest = expectBuildManifest &&
|
||||
(this->NinjaSupportsCleanDeadTool ||
|
||||
this->NinjaSupportsUnconditionalRecompactTool) &&
|
||||
this->NinjaSupportsUnconditionalRecompactTool &&
|
||||
!cmSystemTools::FileExists("build.ninja");
|
||||
|
||||
// The `cleandead` tool needs to know about all outputs in the build we just
|
||||
// wrote out. Ninja-Multi doesn't have a single `build.ninja` we can use that
|
||||
// is the union of all generated configurations, so we can't run it reliably
|
||||
// in that case.
|
||||
if (this->NinjaSupportsCleanDeadTool && !this->DisableCleandead &&
|
||||
expectBuildManifest && !missingBuildManifest) {
|
||||
run_ninja_tool({ "cleandead" });
|
||||
}
|
||||
// The `recompact` tool loads the manifest. As above, we don't have a single
|
||||
// `build.ninja` to load for this in Ninja-Multi. This may be relaxed in the
|
||||
// future pending further investigation into how Ninja works upstream
|
||||
@@ -678,9 +670,6 @@ void cmGlobalNinjaGenerator::CheckNinjaFeatures()
|
||||
}
|
||||
}
|
||||
}
|
||||
this->NinjaSupportsCleanDeadTool = !cmSystemTools::VersionCompare(
|
||||
cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
|
||||
RequiredNinjaVersionForCleanDeadTool().c_str());
|
||||
this->NinjaSupportsUnconditionalRecompactTool =
|
||||
!cmSystemTools::VersionCompare(
|
||||
cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
|
||||
@@ -691,6 +680,9 @@ void cmGlobalNinjaGenerator::CheckNinjaFeatures()
|
||||
this->NinjaSupportsMultipleOutputs = !cmSystemTools::VersionCompare(
|
||||
cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
|
||||
RequiredNinjaVersionForMultipleOutputs().c_str());
|
||||
this->NinjaSupportsMetadataOnRegeneration = !cmSystemTools::VersionCompare(
|
||||
cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
|
||||
RequiredNinjaVersionForMetadataOnRegeneration().c_str());
|
||||
}
|
||||
|
||||
bool cmGlobalNinjaGenerator::CheckLanguages(
|
||||
|
||||
@@ -368,11 +368,14 @@ public:
|
||||
{
|
||||
return "1.10";
|
||||
}
|
||||
static std::string RequiredNinjaVersionForCleanDeadTool() { return "1.10"; }
|
||||
static std::string RequiredNinjaVersionForMultipleOutputs()
|
||||
{
|
||||
return "1.10";
|
||||
}
|
||||
static std::string RequiredNinjaVersionForMetadataOnRegeneration()
|
||||
{
|
||||
return "1.10.2";
|
||||
}
|
||||
bool SupportsConsolePool() const;
|
||||
bool SupportsImplicitOuts() const;
|
||||
bool SupportsManifestRestat() const;
|
||||
@@ -536,8 +539,8 @@ private:
|
||||
bool NinjaSupportsDyndeps = false;
|
||||
bool NinjaSupportsRestatTool = false;
|
||||
bool NinjaSupportsUnconditionalRecompactTool = false;
|
||||
bool NinjaSupportsCleanDeadTool = false;
|
||||
bool NinjaSupportsMultipleOutputs = false;
|
||||
bool NinjaSupportsMetadataOnRegeneration = false;
|
||||
|
||||
private:
|
||||
void InitOutputPathPrefix();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user