Commit Graph

11461 Commits

Author SHA1 Message Date
Brad King
3cea13c2f3 Merge topic 'cmake-presets-host-system-name'
0d497e159b CMakePresets.json: Add ${hostSystemName} macro
79d03ab505 Help: Fix version numbers in CMakePresets.json documentation
69527a1979 Refactor: Pass CMakePresets.json version to ExpandMacros() functions
ad19da011d Refactor: Add cmSystemTools::GetSystemName()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5902
2021-03-16 10:51:32 -04:00
Brad King
64026ded48 Merge topic 'ExternalData-stop-forking-to-cmake'
b6c022eaa2 ExternalData: use `file(CREATE_LINK)`
01cc8bf930 ExternalData: use `file(COPY_FILE)` instead of forking CMake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5875
2021-03-16 10:49:12 -04:00
Brad King
aae3537bc6 Merge topic 'FindMatlab-r2021a'
427f5f2fa9 FindMatlab: R2021a version map

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5907
2021-03-16 10:47:03 -04:00
Kyle Edwards
ad19da011d Refactor: Add cmSystemTools::GetSystemName()
And use it for CMAKE_HOST_SYSTEM_NAME and CMAKE_SYSTEM_NAME.
2021-03-15 14:41:42 -04:00
Michael Hirsch
427f5f2fa9 FindMatlab: R2021a version map 2021-03-15 09:10:07 -04:00
Kyle Edwards
bb9a701a2b CMakePrintHelpers: Work around CACHE argument of set()
Fixes: #21919
2021-03-11 08:55:05 -05:00
Ben Boeckel
b6c022eaa2 ExternalData: use file(CREATE_LINK)
This avoids spawning a new CMake command which isn't necessary.
2021-03-11 08:43:30 -05:00
Ben Boeckel
01cc8bf930 ExternalData: use file(COPY_FILE) instead of forking CMake 2021-03-11 08:43:30 -05:00
Brad King
33900e3c7c Merge topic 'cray-compiler-wrapper-detection'
13144e82cd Cray: Enable Cray compiler wrapper detection on all platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5897
2021-03-11 08:09:33 -05:00
Brad King
f59a3e2148 Merge topic 'cray-compiler-wrapper-detection' into release-3.20
13144e82cd Cray: Enable Cray compiler wrapper detection on all platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5897
2021-03-11 08:09:32 -05:00
Justin LaPolla
13144e82cd Cray: Enable Cray compiler wrapper detection on all platforms
Previously were checking for the `__CRAYXC` and `__CRAYXE` predefined
macros.  These macros reflect the platform that the compiler wrapper is
running on, i.e. Cray XC and Cray XE machines.  They are not defined on
other platforms such as Apollo80.

Switch to the `__CRAYXT_COMPUTE_LINUX_TARGET` macro. The Cray cc/CC/ftn
wrappers always define this macro on the command line. This macro has
been in use for many years, and is believed to be a reliable way to
detect current and older Cray compiler wrappers.

Fixes: #21904
2021-03-10 12:13:17 -05:00
Brad King
ccfa0852c0 Merge topic 'ep-fc-revert-refactoring' into release-3.20
57d442e182 Revert ExternalProject and FetchContent refactoring

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5898
2021-03-10 11:37:15 -05:00
Brad King
03193a9e9a Merge topic 'ep-fc-revert-refactoring'
57d442e182 Revert ExternalProject and FetchContent refactoring

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5898
2021-03-10 11:37:15 -05:00
Brad King
e89a1367b6 Merge topic 'FindMatlab-MCR-vars'
5ba1f4b6ee FindMatlab: Fix Matlab_LIBRARIES for MCR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5896
2021-03-10 11:36:29 -05:00
Craig Scott
57d442e182 Revert ExternalProject and FetchContent refactoring
Refactoring of the ExternalProject and FetchContent modules moved
the commands into CMake scripts. This broke custom commands that
used shell redirection or special build tool variables of the form
$(MakeVar). Undo the sequence of commits that performed this
refactoring and follow-up fixes associated with it.

The following commits are reverted by this change:

4f3d1abbb4 (ExternalProject: Refactor pre-configure steps to support
no-target uses, 2021-02-05)

17e5516e60 (FetchContent: Invoke steps directly and avoid a separate
sub-build, 2021-01-29)

bd876f3849 (FetchContent: Restore patch command support,
2021-02-18)

404cddb7bb (ExternalProject: Fix misuse of IS_NEWER_THAN in
timestamp checks, 2021-02-21)

b0da671243 (FetchContent: Don't update timestamps if files don't
change, 2021-02-18)

Fixes: #21892
2021-03-10 09:07:44 +11:00
Silvio Traversaro
5ba1f4b6ee FindMatlab: Fix Matlab_LIBRARIES for MCR
In commit bda5e2ac8f (FindMatlab: Only include engine and dataarray
libraries if they are found, 2020-12-11, v3.20.0-rc1~297^2~1) we fixed
the imported target to contain optional libraries only if they are
found.  Do the same for `Matlab_LIBRARIES`.
2021-03-09 12:56:08 -05:00
Brad King
22909e0def Merge topic 'CrayPrgEnv-detection' into release-3.20
23b101de60 Revert "Cray: Fix Cray compiler detection on new platforms"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5889
2021-03-09 09:15:43 -05:00
Brad King
2843a322c8 Merge topic 'CrayPrgEnv-detection'
23b101de60 Revert "Cray: Fix Cray compiler detection on new platforms"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5889
2021-03-09 09:15:43 -05:00
Brad King
1982264c17 Merge topic 'ExternalData-windows'
31be23dd1d ci: Restore the Module.ExternalData test on Windows
fdfbf89f0c ExternalData: Avoid replacing a concurrently-created object

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5883
2021-03-08 13:18:24 -05:00
Brad King
31fc010259 Merge topic 'cray-fortran'
ef513fe3d1 Cray: Enable explicit Fortran preprocessing for Ninja generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5882
2021-03-08 13:07:20 -05:00
Brad King
23b101de60 Revert "Cray: Fix Cray compiler detection on new platforms"
The justification in commit 9ee4a42813 (Cray: Fix Cray compiler
detection on new platforms, 2020-12-01, v3.19.2~26^2) confuses detection
of the CrayPrgEnv with identification of the Cray compiler.  The
change regressed detection of the CrayPrgEnv on non-Cray compilers.
Revert it pending further investigation into the original problem.

Fixes: #21894
2021-03-08 12:28:36 -05:00
Brad King
fdfbf89f0c ExternalData: Avoid replacing a concurrently-created object
If more than one content link references the same object, the build
system may launch multiple download processes for the same object
concurrently.  Use whichever one finishes first, and discard the others.

Without this, we replace the objects and use the last finisher instead
of the first.  This is okay on non-Windows platforms where `rename(2)`
gives reliable atomic replacement.  However, on Windows platforms and
NTFS this is less reliable.  I've observed `MoveFileEx` somehow cause
another process to get `ERROR_SHARING_VIOLATION` when attempting to read
the destination file.  We may be able to improve the `file(RENAME)`
implementation on modern Windows 10 versions, but for ExternalData's use
case it is simpler to just not replace existing objects.
2021-03-05 10:58:07 -05:00
Brad King
ef513fe3d1 Cray: Enable explicit Fortran preprocessing for Ninja generator
Cray 11.0 adds support for preprocessing with output written to a
specified file (instead of always next to the source).  Use it to
enable Cray Fortran with the Ninja generator.

Patch-by: James Elliott
Fixes: #20731
2021-03-05 08:11:05 -05:00
Brad King
ef3d1ebda8 Merge topic 'android-r22' into release-3.20
005e2cdfb0 Android: Do not use gold for ndk >= r22
ed7a87f270 Tests: Update RunCMake.Android for NDK r22
4950d35733 Help: Document CMAKE_ANDROID_NDK_VERSION variable
746906242d Android: Detect NDK version number

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5862
2021-03-03 11:11:58 -05:00
Brad King
957a117c70 Merge topic 'android-r22'
005e2cdfb0 Android: Do not use gold for ndk >= r22
ed7a87f270 Tests: Update RunCMake.Android for NDK r22
4950d35733 Help: Document CMAKE_ANDROID_NDK_VERSION variable
746906242d Android: Detect NDK version number

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5862
2021-03-03 11:11:58 -05:00
Haibo Huang
005e2cdfb0 Android: Do not use gold for ndk >= r22
Fixes: #21772
2021-03-03 10:28:56 -05:00
Haibo Huang
746906242d Android: Detect NDK version number
Report it in `CMAKE_ANDROID_NDK_VERSION`.
2021-03-03 10:26:36 -05:00
Brad King
3aec26660a Merge topic 'nasm_add_deps'
48e74ec1e6 ASM_NASM: generate depfiles for other makefiles
fcf16e9459 ASM_NASM: Add depfile generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5868
2021-03-03 09:06:06 -05:00
Brad King
aa10501d32 Merge topic 'compilerid_require_success'
1bd8f19453 CMakeDetermineCompilerId: Fix REQUIRE_SUCCESS with multiple user flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5874
2021-03-03 09:03:34 -05:00
Raul Tambre
1bd8f19453 CMakeDetermineCompilerId: Fix REQUIRE_SUCCESS with multiple user flags
Need to quote the list expansion otherwise we'll try each argument separately.
2021-03-02 16:20:45 +02:00
Brad King
0d4e93e88b Merge topic 'Tocic-master-patch-04743'
507710438d FindBoost: Fix typo in documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5869
2021-03-02 08:46:41 -05:00
Brad King
b212fba208 Merge topic 'FindOpenGL-GLX-no-GLVND' into release-3.20
fb4b2ed0d3 FindOpenGL: handle GLX without GLVND

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5861
2021-03-02 08:45:59 -05:00
Brad King
579c383336 Merge topic 'FindOpenGL-GLX-no-GLVND'
fb4b2ed0d3 FindOpenGL: handle GLX without GLVND

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5861
2021-03-02 08:45:59 -05:00
Francesco Bertolaccini
48e74ec1e6 ASM_NASM: generate depfiles for other makefiles 2021-03-02 12:27:47 +01:00
Francesco Bertolaccini
fcf16e9459 ASM_NASM: Add depfile generation 2021-03-01 15:21:17 -05:00
Tocic
507710438d FindBoost: Fix typo in documentation 2021-03-01 14:58:10 -05:00
Brad King
11506eb129 Merge topic 'FindDoxygen-policy-warnings'
79fa7529e0 FindDoxygen: Prevent CMP0054 policy warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5864
2021-03-01 14:57:39 -05:00
Brad King
0034289d06 Merge topic 'compilerid_require_success'
bdc40742bd CMakeDetermineCompilerId: Test without COMPILER_ID_FLAGS if REQUIRE_SUCCESS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5863
2021-03-01 14:56:31 -05:00
Brad King
7a10aa922d Merge topic 'FindIntl-FindIconv-versions'
a9b11a06f5 FindIntl: Add version support
01e9922db5 FindIconv: Add version support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5852
2021-03-01 14:55:10 -05:00
Craig Scott
47f2d367a4 Merge topic 'FetchContent-docs'
24b467c043 Help: Prefer commit hashes in FetchContent examples for security reasons
ebcb8896e3 Help: Add missing MD5= for URL_HASH in FetchContent example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5834
2021-02-27 23:23:39 -05:00
Craig Scott
79fa7529e0 FindDoxygen: Prevent CMP0054 policy warnings
Fixes: #21871
2021-02-28 11:34:05 +11:00
Raul Tambre
bdc40742bd CMakeDetermineCompilerId: Test without COMPILER_ID_FLAGS if REQUIRE_SUCCESS
If we REQUIRE_SUCCESS, i.e. TEST_FLAGS_FIRST must work, we need to also try
without user flags.

Fixes #21869.
2021-02-27 14:25:26 +02:00
Ben Boeckel
fb4b2ed0d3 FindOpenGL: handle GLX without GLVND
On Ubuntu, installing `libgl-dev` provides `libGL` and `libGLX`, but no
`libOpenGL`. Avoid defining GLVND targets without the `OpenGL::OpenGL`
target.
2021-02-26 15:36:55 -05:00
Raul Tambre
8211b4706f IntelLLVM: C17 support
Issue: #17755
2021-02-25 12:50:45 -05:00
Raul Tambre
b9c3acac02 GNU: C23 support
Added in commit 9f936c861383dc69e0053e34315d5d0262a19e8f, released in 9.1.
2021-02-25 18:22:32 +02:00
Raul Tambre
c9f0613c2a GNU: C17 support
Added in commit c76dc9c32d616eff1e0ae162042f1c0f8ca65fbf, released in 8.1.
Set as default in the same commit.

Issue: #17755
2021-02-25 18:22:32 +02:00
Raul Tambre
10a72c0f1c Clang: Default C standard doesn't depend on compatibility mode
MSVC compatibility mode doesn't affect the default standard.
2021-02-25 18:22:32 +02:00
Raul Tambre
6c2e309a66 Clang: Set standard flags according to frontend variant
They depend on the frontend not which compiler we're simulating.

Fixes #21771.
2021-02-25 18:22:32 +02:00
Raul Tambre
9f81591dbf Clang: MSVC-style C flags
Support added in LLVM commit d087d805acb664e885e9c31a916f6cfa5dbc2186, will be
released in Clang 13.
2021-02-25 18:22:32 +02:00
Raul Tambre
72f4984cdc Clang: C23 support
Added in LLVM commit d06f3917913d2558b771ccc48d838f8cd8993c01, released in
Clang 9.0.
2021-02-25 18:22:32 +02:00