Commit Graph

34732 Commits

Author SHA1 Message Date
Kitware Robot
d5e030fa67 CMake Nightly Date Stamp 2023-10-19 00:01:07 -04:00
Brad King
a3fbc255ff Merge topic 'project-include-multiple'
704acca96b CMAKE_PROJECT_INCLUDE: Add support for including multiple files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8884
2023-10-18 10:08:49 -04:00
Brad King
aff7870172 Merge topic 'cxxmodules-vs-no-synthetic-targets'
17fd7fe2ae Tests/CXXModules: test Visual Studio synthetic target error
badb6ab120 VS: Explicitly disallow C++ modules provided by imported targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8895
2023-10-18 09:51:53 -04:00
Cristian Le
704acca96b CMAKE_PROJECT_INCLUDE: Add support for including multiple files
Fixes: #25341
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2023-10-18 13:39:55 +02:00
Kitware Robot
7144216f45 CMake Nightly Date Stamp 2023-10-18 00:01:06 -04:00
Ben Boeckel
badb6ab120 VS: Explicitly disallow C++ modules provided by imported targets
The `-ifcOnly` flag is understood by MSBuild, but there are unresolved
questions about how to integrate with with CMake's model.

See: #25328
2023-10-17 14:46:57 -04:00
Brad King
3f49c0369d Merge topic 'update-libarchive'
d83c9ff24a Utilities: Update hard-coded try_compile results for libarchive 3.7.2
0ff572370f libarchive: Set build options the way we need for CMake
b281fd471a libarchive: Add cm3p prefixes on includes new to version 3.7.2
c4fec0edd6 Merge branch 'upstream-LibArchive' into update-libarchive
939e164ee5 LibArchive 2023-09-12 (6468cd1f)
1cc25f22ff libarchive: Update script to get 3.7.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8890
2023-10-17 10:23:47 -04:00
Brad King
dd78592ba1 Merge topic 'try_compile-alias-targets'
8f9f371668 try_compile: Add support for using ALIAS targets
9f8aa94192 Add missing `OUTPUT` in ExportImport test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8877
2023-10-17 10:22:54 -04:00
Brad King
c672e51bd3 Merge topic 'try_compile-linker-language'
0f37000304 try_{compile,run}: add LINKER_LANGUAGE option
dc0dbffb0f Tests: Remove redundant policy setting from RunCMake.try_{compile,run} cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8871
2023-10-17 10:18:56 -04:00
Brad King
46dc523d7e Merge topic 'cxxmodules-export-fileset-info'
0f36156740 cxxmodules: include `INCLUDES DESTINATION` directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8886
2023-10-17 09:50:07 -04:00
Brad King
5c1daf8e24 Merge topic 'execute_process-output_file-directory'
35f031e3b2 execute_process(): Restore opening files relative to WORKING_DIRECTORY

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8883
2023-10-17 09:41:39 -04:00
Kitware Robot
d3bcbdc5a2 CMake Nightly Date Stamp 2023-10-17 00:01:07 -04:00
Brad King
0ff572370f libarchive: Set build options the way we need for CMake 2023-10-16 18:56:18 -04:00
Cristian Le
8f9f371668 try_compile: Add support for using ALIAS targets
Fixes: #25337
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2023-10-16 20:22:23 +02:00
Ben Boeckel
0f36156740 cxxmodules: include INCLUDES DESTINATION directories
These paths are added outside the normal property management mechanisms.
Shuttle the value to the C++ module export as needed.

Fixes: #25289
2023-10-16 13:57:54 -04:00
Kyle Edwards
35f031e3b2 execute_process(): Restore opening files relative to WORKING_DIRECTORY
Prior to 5420639a, execute_process() would open INPUT_FILE, OUTPUT_FILE,
and ERROR_FILE relative to the WORKING_DIRECTORY argument if it was
provided. Restore this behavior for backwards compatibility.

Fixes: #25338
2023-10-16 12:23:41 -04:00
scivision
0f37000304 try_{compile,run}: add LINKER_LANGUAGE option
Fixes: #25326
2023-10-16 11:30:17 -04:00
Brad King
fceeaff949 Merge topic 'linker-user-selection'
96a953b1ed Add options to specify linker tool

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8861
2023-10-16 10:39:51 -04:00
Brad King
5dce52e417 Merge topic 'revert-autogen-exe-per-config'
c074f5c81e Autogen: Revert "AUTO*_EXECUTABLE: add support for per-config values"
06a9b25b17 Tests: Revert "NinjaMultiConfig: Update tests for the new dependency change"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8878
2023-10-16 10:35:59 -04:00
Kitware Robot
4fd3397b6a CMake Nightly Date Stamp 2023-10-16 00:02:05 -04:00
Kitware Robot
734a009dcf CMake Nightly Date Stamp 2023-10-15 00:01:05 -04:00
Kitware Robot
0506d1d382 CMake Nightly Date Stamp 2023-10-14 00:01:19 -04:00
Orkun Tokdemir
c074f5c81e Autogen: Revert "AUTO*_EXECUTABLE: add support for per-config values"
Changing the `timestamp` file to `timestamp_$<CONFIG>` causes some user
projects to break when using Qt versions older than 6.6.

Revert commit fddd0f0443 (Autogen: AUTO*_EXECUTABLE: add support for
per-config values, 2023-06-14, v3.28.0-rc1~96^2~1) pending further
investigation.

Issue: #20074
2023-10-13 14:16:26 -04:00
Marc Chevrier
96a953b1ed Add options to specify linker tool
Offer the capability, through variable `CMAKE_LINKER_TYPE`, as well as
the target property `LINKER_TYPE` to specify which linker must be used.

The implementation of this capability is specified by variables specific
to the language and linker type: `CMAKE_<LANG>_USING_LINKER_<TYPE>`.
Some definitions are provided as part of `CMake`.

For example, to select the `LLVM` linker rather than the standard one,
the type `LLD` should be specified through the variable `CMAKE_LINKER_TYPE`.
And, on `Apple`, `Linux` and some environments on `Windows`, the variable
`CMAKE_<LANG>_USING_LINKER_LLD` has value `-fuse-ld=lld`. And for `Windows`
environments  based on `MSVC`, where the linker is used directly, the tool
`lld-link.exe` will be used rather than `link.exe`.

Fixes: #19174, #24254, #24990
2023-10-13 11:52:35 +02:00
Kitware Robot
ee5f31ba72 CMake Nightly Date Stamp 2023-10-13 00:01:16 -04:00
Kitware Robot
bf5185ead7 CMake Nightly Date Stamp 2023-10-12 00:01:13 -04:00
Brad King
38643edc2d CMake 3.28.0-rc1 2023-10-11 14:33:33 -04:00
Brad King
b232269c4f Merge topic 'cxxmodules-try_compile'
fd81024e80 cxxmodules: Honor CMAKE_CXX_SCAN_FOR_MODULES in try_compile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8865
2023-10-11 10:31:06 -04:00
Brad King
581a03a138 Merge topic 'cxxmodules-try_compile' into release-3.28
fd81024e80 cxxmodules: Honor CMAKE_CXX_SCAN_FOR_MODULES in try_compile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8865
2023-10-11 10:31:05 -04:00
Brad King
d27a41f29f Merge topic 'cxxmodules-diagnostics'
32438138c3 cxxmodules: Reference documentation in no-modules-support diagnostics
604466b83e Tests: Enforce RunCMake.CXXModules no-modules-support diagnostics strictly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8866
2023-10-11 10:29:59 -04:00
Brad King
32438138c3 cxxmodules: Reference documentation in no-modules-support diagnostics
Help users avoid errors about module support when they may not need it.

While at it, polish sentence syntax in the diagnostic messages.
2023-10-11 09:52:41 -04:00
Kitware Robot
3123069e9a CMake Nightly Date Stamp 2023-10-11 00:01:14 -04:00
Brad King
fd81024e80 cxxmodules: Honor CMAKE_CXX_SCAN_FOR_MODULES in try_compile
Under CMP0155's NEW behavior, projects that explicitly enable C++20
support with `set(CMAKE_CXX_STANDARD 20)` may also explicitly
disable scanning with `set(CMAKE_CXX_SCAN_FOR_MODULES OFF)`.
We already propagate `CMAKE_CXX_STANDARD` into `try_compile` test
projects, so propagate `CMAKE_CXX_SCAN_FOR_MODULES` too.

Fixes: #25313
2023-10-10 11:25:21 -04:00
Kitware Robot
a93f5fbdec CMake Nightly Date Stamp 2023-10-10 00:01:09 -04:00
Kitware Robot
110b694017 CMake Nightly Date Stamp 2023-10-09 00:01:44 -04:00
Kitware Robot
b6890ed944 CMake Nightly Date Stamp 2023-10-08 00:01:12 -04:00
Kitware Robot
bc82d62b1b CMake Nightly Date Stamp 2023-10-07 00:01:14 -04:00
Brad King
06f8a60c93 Merge topic 'post-rel-dev'
be045c7c16 Configure CMake itself with policies through CMake 3.27
c5f1af1ffe export: Increase maximum policy version in exported files to 3.27
86d910ab73 Add deprecation warnings for policies CMP0126 and below

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8858
2023-10-06 08:42:02 -04:00
Brad King
afa8d8c60e Merge topic 'cxxmodules-explicit-c++20'
b8ead378de cxxmodules: Scan only targets that explicitly enable C++ 20
68fca3eafe cmGeneratorTarget: Track explicitly enabled language standard levels
da36e0638b cmGeneratorTarget: Remove outdated const/mutable pair
c1f1aedcee cmStandardLevelResolver: Add method to look up standard level by name
23b57462aa cmStandardLevelResolver: Report feature std level from GetNewRequiredStandard
7519001ae6 cmStandardLevelResolver: Add method to get feature standard level
99fa01d3fa cmStandardLevelResolver: Factor out public representation of level
fdd81a609a cmStandardLevelResolver: Clarify local variable name
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8860
2023-10-06 08:36:03 -04:00
Kitware Robot
84a4e294fc CMake Nightly Date Stamp 2023-10-06 00:01:17 -04:00
Brad King
b8ead378de cxxmodules: Scan only targets that explicitly enable C++ 20
Previously we scanned any targets for which C++ 20 is enabled,
even if enabled only by the compiler's default, such as when
`CXXFLAGS=-std=c++20`.
2023-10-05 13:17:00 -04:00
Brad King
68fca3eafe cmGeneratorTarget: Track explicitly enabled language standard levels
Previously we only tracked when an explicit setting requires the
standard level to be higher than the compiler's default.
2023-10-05 13:16:24 -04:00
Kitware Robot
0d5a247dfa CMake Nightly Date Stamp 2023-10-05 00:01:15 -04:00
Brad King
da36e0638b cmGeneratorTarget: Remove outdated const/mutable pair 2023-10-04 18:45:30 -04:00
Brad King
c1f1aedcee cmStandardLevelResolver: Add method to look up standard level by name 2023-10-04 18:44:44 -04:00
Brad King
23b57462aa cmStandardLevelResolver: Report feature std level from GetNewRequiredStandard
Regardless of whether the feature requires a new (higher) standard
level, always report the standard level that the feature needs.
2023-10-04 18:44:18 -04:00
Brad King
7519001ae6 cmStandardLevelResolver: Add method to get feature standard level 2023-10-04 18:15:04 -04:00
Brad King
99fa01d3fa cmStandardLevelResolver: Factor out public representation of level 2023-10-04 17:14:58 -04:00
Brad King
fdd81a609a cmStandardLevelResolver: Clarify local variable name 2023-10-04 17:14:58 -04:00
Brad King
73a1d422a5 cmStandardLevelResolver: Mark builtin language standards table as const 2023-10-04 17:14:58 -04:00