Commit Graph

2599 Commits

Author SHA1 Message Date
Craig Scott
7ab880421a Merge topic 'ExternalProject-declare-download-byproducts'
872daff159 ExternalProject: declare byproducts for the download step

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8823
2023-10-01 07:12:56 -04:00
Ben Boeckel
872daff159 ExternalProject: declare byproducts for the download step
This can surface a conflict where two projects download the same file
and get scheduled against each other.
2023-09-30 15:59:22 +10:00
Brad King
b8151299de Merge topic 'genexp-no-eval'
634079b86d cmGeneratorExpressionEvaluator: Short-circuit boolean operators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !8791
2023-09-26 09:31:42 -04:00
Brad King
0be496cb5a Merge topic 'orangec-compiler'
f8fa4f1ad7 ci: Add OrangeC 6.73.1 nightly CI job
531b4fe643 OrangeC: Add support for OrangeC compiler
10f435a58f Tests: Simplify nested if conditions in Complex tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Victor <lostfreeman@gmail.com>
Merge-request: !8592
2023-09-26 09:23:10 -04:00
Craig Scott
8a90ae92af Merge topic 'FetchContent-EXCLUDE_FROM_ALL'
5f77807f1c FetchContent: Add support for EXCLUDE_FROM_ALL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8822
2023-09-26 08:35:45 -04:00
Steven Stallion
5f77807f1c FetchContent: Add support for EXCLUDE_FROM_ALL
Fixes: #20167
2023-09-26 08:56:44 +10:00
David Lindauer
531b4fe643 OrangeC: Add support for OrangeC compiler
Add compiler information modules.  Update the test suite.

Fixes: #25032
Co-authored-by: Brad King <brad.king@kitware.com>
2023-09-25 12:27:29 -04:00
Ryan Krattiger
80838316a8 CrayClang: Add support for this compiler
Add `CrayClang` compiler ID for newer Cray compilers.

Fixes: #25102
2023-09-22 09:39:52 -04:00
Brad King
122ec98dcf Merge topic 'hip-nvidia'
6546aa2a2a ci: Add HIP job using CUDA on NVIDIA GPUs
18158bf81c HIP: Add support for NVIDIA GPUs
127b6fa06b HIP: Add CMAKE_HIP_PLATFORM variable to specify GPU platform
90e23f40ee Tests/HIP/WithDefs: Clean up test case
9ebdf3281f Tests/HIP/ArchitectureOff: Cover HIP_ARCHITECTURES initialization
cfec29196e ci: Add CUDA 11.8 to HIP 5.5 image
26470eb987 ci: Put HIP GPU platform in CMake_TEST_HIP

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8817
2023-09-22 09:19:52 -04:00
Brad King
18158bf81c HIP: Add support for NVIDIA GPUs
Add support for using the CUDA Toolkit's NVCC to compile HIP code.

Fixes: #25143
2023-09-21 15:34:37 -04:00
Brad King
127b6fa06b HIP: Add CMAKE_HIP_PLATFORM variable to specify GPU platform
For now, require the value to be `amd`, since that is the only
platform we currently support.
2023-09-21 15:34:37 -04:00
Brad King
f83790af0b Merge topic 'fileset-private-dep'
ec2ba29ac5 Ninja: Allow compilation before generation of dependencies' private sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8420
2023-09-21 09:39:56 -04:00
Martin Duffy
ec2ba29ac5 Ninja: Allow compilation before generation of dependencies' private sources
This requires knowing when a generated header is public, which we can
model using file sets.  Add policy CMP0154 to treat generated sources
as private by default in targets with file sets.  Generated public
headers can be specified in public file sets.

Fixes: #24959
Issue: #15555
2023-09-20 10:25:24 -04:00
Corentin Noël
e0d00b9218 FindPkgConfig: Allow to override variables when calling pkg_get_variable
This is specifically useful when building applications within containers as we
sometimes need to redefine the prefix used in a variable.
2023-09-19 09:08:48 +02:00
Brad King
0a81110b84 find_(library|file|path): Drop PATH-derived search prefixes
Since commit ffc06c1239 (Teach find_(library|file|path) to get prefixes
from PATH, 2015-02-18, v3.3.0-rc1~430^2) we search in `<prefix>/include`
and `<prefix>/lib` directories for prefixes with `bin` directories in
the `PATH` environment variable.  The motivation was to search the
installation prefixes of MSYS and MinGW development environments
automatically.

This behavior can search undesired prefixes that happen to be in the
`PATH` for unrelated reasons.  It was reverted for non-Windows hosts
within a year by commit b30b32a493 (Drop find_(library|file|path)
prefixes from PATH on non-Windows, 2016-05-09, v3.6.0-rc1~82^2) but was
kept on Windows hosts to support its motivating use case.  However,
similar problems have since been observed on Windows.  For example,
commit 955d6245c1 (MSVC: Revert "Teach find_library to consider the
'libfoo.a' naming convention", 2022-11-28, v3.25.1~6^2) was primarily
due to undesired discovery of libraries in `PATH`-derived prefixes.

Since commit 5e5132e1b1 (MinGW: Search for packages in standard MSYSTEM
environment prefixes, 2023-09-11) we search MSYS and MinGW environments'
prefixes explicitly, so `PATH`-derived prefixes are no longer needed for
the original motivating use case.

Fixes: #24216
2023-09-14 15:13:50 -04:00
Brad King
6576ca15f6 Merge topic 'mingw-search-prefixes'
5e5132e1b1 MinGW: Search for packages in standard MSYSTEM environment prefixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8796
2023-09-14 12:50:41 -04:00
Martin Duffy
634079b86d cmGeneratorExpressionEvaluator: Short-circuit boolean operators 2023-09-13 18:01:14 -04:00
Brad King
5e5132e1b1 MinGW: Search for packages in standard MSYSTEM environment prefixes
MSYS2 and similar MinGW/MSYS distributions define development
environments with a `MSYSTEM` environment variable.  Each such
environment has a documented installation prefix for its packages,
often provided by a `MSYSTEM_PREFIX` environment variable.
Since commit 84a25fc263 (cmake_host_system_information: Add
MSYSTEM_PREFIX query, 2023-09-08) we can look up this prefix.

Add `$MSYSTEM_PREFIX/local` and `$MSYSTEM_PREFIX` to our system search
prefixes when targeting MinGW under `MSYSTEM` environments.  This is
their equivalent to `/usr/local` and `/usr`, which we search by default
on UNIX systems.

Issue: #24216
2023-09-13 08:35:59 -04:00
Brad King
976659c846 Merge topic 'presets-schema'
f1a7179520 presets: Add $schema property to JSON schema
f83771dfce presets: Add missing spaces in JSON schema

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8777
2023-09-12 09:08:17 -04:00
ChenMoFeiJin
f1a7179520 presets: Add $schema property to JSON schema
Many modern code editors have support for JSON Schema.  When you specify
the `$schema` property in a JSON file, the editor can provide features
like auto-completion, error checking, etc., which can improve your
efficiency when writing and modifying the `CMakePresets.json` file.
2023-09-12 18:18:37 +08:00
Brad King
84a25fc263 cmake_host_system_information: Add MSYSTEM_PREFIX query
Add a query on Windows hosts for the installation prefix of a
MSYS or MinGW development environment.

Issue: #24216
2023-09-10 07:33:47 -04:00
Gregor Jasny
b78a14e204 Xcode: reject legacy buildsystem for Xcode 14
With Xcode 14 support for the Legacy Build System has been removed
and the BuildSystemType in the WorkspaceSettings is ignored.
If CMake still generates projects targeted to the Lecacy Build
System the build preparation phase will likely fail because Xcode
for example misses any declared outputs from script invocations.

This is a hard to debug problem and CMake should reject the invalid
configuration instead.
2023-08-31 10:13:57 +02:00
Brad King
ef2bab7687 Utilities/Release: Update docker specs for linux-x86_64 to centos 7
Update the centos base image from centos 6 to centos 7.  The latter is
the minimum version supported by libuv 1.45.  The resulting binaries
require GLIBC 2.17.
2023-08-16 14:29:55 -04:00
Chris Mahoney
bc43398e72 ExternalProject: Enable Make Job Server with Explicit Build Command
Introduces `BUILD_JOB_SERVER_AWARE` option to `ExternalProject_Add` and
`JOB_SERVER_AWARE` to `ExternalProject_Add_Step`. When using an explicit
`BUILD_COMMAND` or `COMMAND`, the generated commands won't use `$(MAKE)`
thus failing to connect to the outer make's job server. These new
options enable explicit job server integration.

Co-authored-by: Brad King <brad.king@kitware.com>

Fixes: #16273
2023-08-15 12:21:30 +00:00
Kyle Edwards
2eab65ca82 Merge topic 'test-properties-directory'
2ccb897d86 get_test_property(): Add DIRECTORY option
84e76fedb0 get_property(TEST): Add DIRECTORY option
efc8f19cc5 set_tests_properties(): Add DIRECTORY option
753999d4db set_property(TEST): Add DIRECTORY option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8709
2023-08-14 11:18:54 -04:00
Kyle Edwards
2ccb897d86 get_test_property(): Add DIRECTORY option 2023-08-11 10:50:52 -04:00
Kyle Edwards
84e76fedb0 get_property(TEST): Add DIRECTORY option 2023-08-11 10:50:52 -04:00
Kyle Edwards
efc8f19cc5 set_tests_properties(): Add DIRECTORY option 2023-08-11 10:50:52 -04:00
Kyle Edwards
753999d4db set_property(TEST): Add DIRECTORY option 2023-08-10 17:36:14 -04:00
Kyle Edwards
c8c1dd0d95 CTest: Add ability to dynamically generate resource spec file
Issue: #25106
2023-08-10 16:47:51 -04:00
Brad King
17dcd9424a Merge topic 'xcode-embed-resources'
e40d2cb3af Xcode: Add embed resources support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Deal <halx99@live.com>
Merge-request: !8632
2023-08-01 09:33:15 -04:00
halx99
e40d2cb3af Xcode: Add embed resources support 2023-07-31 09:08:10 +08:00
Kyle Edwards
9bf8f7de06 find_library(): Add support for .xcframework
Issue: #21752
2023-07-28 14:41:45 -04:00
Kyle Edwards
7050ac56a1 macOS: Add support for linking against .xcframework folders
Issue: #21752
2023-07-26 17:00:01 -04:00
Kyle Edwards
ff12a57d5e exec_program(): Remove by policy CMP0153 2023-07-25 11:09:56 -04:00
Brad King
4c9b0fe432 Merge topic 'deprecate-install-combined'
7d3eede923 Help: Document IOS_INSTALL_COMBINED as deprecated

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8641
2023-07-21 09:39:21 -04:00
Márton Marczell
7d3eede923 Help: Document IOS_INSTALL_COMBINED as deprecated
The approach has not made sense since the introduction of Apple Silicon
and macOS arm64.

Issue: #24957
2023-07-20 11:21:24 -04:00
Brad King
88c6dc75ba Merge topic 'command-job-server-aware'
95941fd990 add_custom_{target,command}: Add argument JOB_SERVER_AWARE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8547
2023-07-20 10:23:31 -04:00
Brad King
b0054dd65c Merge topic 'imported-implib-only'
7351d590ee cmTarget: Add a way to represent imported shared library stubs
83574a4772 GeneratorExpression: Expand testing of imported location resolution
b75ff51947 Testing: Map RelWithDebInfo config in GeneratorExpression test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Jason Juang <jasjuang@gmail.com>
Merge-request: !8582
2023-07-19 10:55:30 -04:00
Chris Mahoney
95941fd990 add_custom_{target,command}: Add argument JOB_SERVER_AWARE
Issue: #16273
2023-07-19 10:45:33 -04:00
Robert Maynard
7351d590ee cmTarget: Add a way to represent imported shared library stubs
Shared library stubs can be used for linking, but not at runtime.
Their role is similar to import libraries on Windows, so represent
their location with the `IMPORTED_IMPLIB` target property.

Fixes: #24940
2023-07-18 13:21:01 -04:00
Gregor Jasny
25977e177b apple: add preliminary visionOS support 2023-07-11 20:20:25 +02:00
Brad King
75b573a628 Deprecate Visual Studio 12 2013 generator
Update documentation to mark the generator deprecated.  Add a warning at
the end of generation plus an option to turn off the warning.
2023-06-26 12:41:18 -04:00
Brad King
61bb728c0c Merge topic 'imported-target-framework-path'
d605f728f7 macOS: Allow IMPORTED_LOCATION to be a framework folder

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8586
2023-06-26 09:47:30 -04:00
Kyle Edwards
d605f728f7 macOS: Allow IMPORTED_LOCATION to be a framework folder
Issue: #24946
2023-06-23 12:07:18 -04:00
Brad King
09df135b60 Merge topic 'FindEXPAT-static'
302501ad36 FindEXPAT: add a EXPAT_USE_STATIC_LIBS hint

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8572
2023-06-23 11:01:48 -04:00
Even Rouault
302501ad36 FindEXPAT: add a EXPAT_USE_STATIC_LIBS hint
The effect of that hint is to restrict the candidate library names, but
more essentially to set the `XML_STATIC` compile definitions which is
required to get proper linking.

Vcpkg-Issue: https://github.com/microsoft/vcpkg/issues/1100
GDAL-Issue: https://github.com/OSGeo/gdal/issues/7955
2023-06-22 10:18:07 -04:00
Even Rouault
97d0f76453 FindCURL: add a CURL_USE_STATIC_LIBS hint
The effect of that hint is to set a CURL_STATICLIB compile definition,
and to auxiliary system windows libraries for MSVC builds.

GDAL-Issue: https://github.com/OSGeo/gdal/issues/7955
2023-06-22 10:17:16 -04:00
Brad King
ed37038a1c Merge topic 'cross-compiling-emulator-env-var'
7005dea005 CrossCompiling: Load CMAKE_CROSSCOMPILING_EMULATOR from environment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8543
2023-06-14 09:18:45 -04:00
Brad King
536c1de1d4 Drop Visual Studio 11 2012 generator
This generator has been deprecated since CMake 3.25.  Remove it.
2023-06-13 14:20:48 -04:00