Commit Graph

35327 Commits

Author SHA1 Message Date
Kitware Robot
709f4ea1de CMake Nightly Date Stamp 2024-02-24 00:01:16 -05:00
Brad King
7f1bdcc714 Merge topic 'vs-UseDebugLibraries'
721d8b192a VS: Add UseDebugLibraries to vcxproj files by default
47136b6959 VS: Suppress more MSBuild defaults affected by UseDebugLibraries
82a174182a cmVisualStudioGeneratorOptions: Add UsingDebugRuntime method
f498032141 cmVisualStudioGeneratorOptions: Rename {IsDebug => UsingDebugInfo}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9275
2024-02-23 08:35:04 -05:00
Kitware Robot
87f270800c CMake Nightly Date Stamp 2024-02-23 00:01:11 -05:00
Brad King
721d8b192a VS: Add UseDebugLibraries to vcxproj files by default
Use heuristics to select a reasonable value.  Add policy CMP0162
to provide compatibility with existing projects.

Fixes: #25327
2024-02-22 08:43:16 -05:00
Brad King
47136b6959 VS: Suppress more MSBuild defaults affected by UseDebugLibraries
Extend commit 67de5b7b82 (VS: Suppress MSBuild default settings affected
by UseDebugLibraries, 2024-02-13) to cover a `Microsoft.Cl.Common.props`
default from VS 2015 and older.
2024-02-22 08:42:58 -05:00
Brad King
14ed766e12 Merge topic 'preset-includes-macro-expansion'
1a38ffc656 presets: Expand more macros in the `include` directive

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9108
2024-02-22 08:32:10 -05:00
Brad King
2ce2aebb6f Merge topic 'restore-link-interface-objlib-with-unity'
5b8e9e068f Restore support for TARGET_OBJECTS in link interfaces with unity builds
1313c78a9c Tests: Update RunCMake.TargetObjects cmake_minimum_required version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9279
2024-02-22 08:26:12 -05:00
Kitware Robot
54c36c7557 CMake Nightly Date Stamp 2024-02-22 00:01:19 -05:00
Brad King
5b8e9e068f Restore support for TARGET_OBJECTS in link interfaces with unity builds
This was broken by commit df08c37a42 (cmGlobalGenerator: Add unity/pch
sources after computing compile features, 2024-02-02, v3.28.3~1^2~1^2),
and 3.28.2's commit 76b5383123 (cmGlobalGenerator: add unity sources
after computing target compile features, 2024-01-01, v3.28.2~17^2~1).

The problem is very similar to that fixed by commit 4e8f24e977 (PCH:
Clear link interface cache when adding PCH object to it, 2022-01-24,
v3.23.0-rc1~44^2~9).  Generalize that fix.

Fixes: #25696
2024-02-21 17:08:57 -05:00
Cristian Le
1a38ffc656 presets: Expand more macros in the include directive
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2024-02-21 13:47:08 -05:00
Brad King
07c219da13 Merge topic 'cxxmodules-transitive-modules-usage'
ec348ee4b9 cmGeneratorTarget: discover synthetic targets recursively
67466ddf65 cmExportFileGenerator: export link libraries as-is
a2e3e61a31 Tests/CXXModules: test transitive modules usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9273
2024-02-21 13:34:36 -05:00
Kitware Robot
f5b0fe1899 CMake Nightly Date Stamp 2024-02-21 00:01:17 -05:00
Ben Boeckel
ec348ee4b9 cmGeneratorTarget: discover synthetic targets recursively
Fixes: #25288
2024-02-20 10:53:31 -05:00
Ben Boeckel
67466ddf65 cmExportFileGenerator: export link libraries as-is
This allows for transitive modules to work because
`$<COMPILE_ONLY>`-wrapped dependencies do not end up in the
`linked-target-dirs` collator property. Test suite exported property
tests updated to account for the change.
2024-02-20 10:53:31 -05:00
Brad King
82a174182a cmVisualStudioGeneratorOptions: Add UsingDebugRuntime method 2024-02-20 10:48:31 -05:00
Brad King
f498032141 cmVisualStudioGeneratorOptions: Rename {IsDebug => UsingDebugInfo}
The latter name is more precise.
2024-02-20 10:48:31 -05:00
Brad King
3a171009e9 Merge topic 'vs-UseDebugLibraries'
b814641444 VS: Add [CMAKE_]VS_USE_DEBUG_LIBRARIES options to control UseDebugLibraries
67de5b7b82 VS: Suppress MSBuild default settings affected by UseDebugLibraries
0ae372daee VS: Factor out common MS tool configuration

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9270
2024-02-20 10:37:32 -05:00
Brad King
9e8731b2ff Merge topic 'vs-17.10'
d256581bb0 VS: Fix '-T version=14.40' under VS 17.10 preview 1
3a7fbd04c8 VS: Verify toolset version= field format more strictly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9271
2024-02-20 10:36:01 -05:00
Brad King
5bc5a485fa Merge topic 'cxxmodules-transitive-target-usage'
8b6fc81fc3 cmTarget: copy link libraries from the right properties
d4a517f82a Tests/CXXModules: add a test with transitive targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9265
2024-02-20 10:30:26 -05:00
Brad King
d256581bb0 VS: Fix '-T version=14.40' under VS 17.10 preview 1
VS 17.10 preview 1 comes with toolset `v143` version `14.40`.  This is
the first time that the first three digits of the version do not match
the toolset name.  Add a special case to map version `14.40` back to
toolset `v143`.
2024-02-20 06:23:34 -05:00
Kitware Robot
821a43b1d4 CMake Nightly Date Stamp 2024-02-20 00:01:14 -05:00
Brad King
3a7fbd04c8 VS: Verify toolset version= field format more strictly
In commit 5f13168419 (VS: Add option to select the version of the
toolset used by VS 2017, 2018-05-19, v3.12.0-rc1~38^2) we added logic to
verify that the toolset version, such as `14.35`, matches the toolset
name, such as `v143`.  Clarify the logic to not construct a temporary
nonsensical toolset name like `v1435`.  Also verify the format of the
toolset version more strictly, e.g., to reject `14.350` earlier.
Previously the latter example was only rejected by the `.props` file not
existing.
2024-02-19 12:06:48 -05:00
Brad King
b814641444 VS: Add [CMAKE_]VS_USE_DEBUG_LIBRARIES options to control UseDebugLibraries
This indicates to MSBuild which configurations are considered debug
configurations.  This is useful for reference both by humans and tools.

Issue: #25327
2024-02-19 10:40:41 -05:00
Brad King
67de5b7b82 VS: Suppress MSBuild default settings affected by UseDebugLibraries
`Microsoft.Cl.Common.props` changes some default settings based on
`UseDebugLibraries`.  CMake models its own controls for these settings,
so if the project does not set them, explicitly suppress them to avoid
letting `UseDebugLibraries` affect them.
2024-02-19 10:40:40 -05:00
Brad King
0ae372daee VS: Factor out common MS tool configuration
De-duplicate code writing `PlatformToolset`.
2024-02-19 10:40:40 -05:00
Ben Boeckel
8b6fc81fc3 cmTarget: copy link libraries from the right properties
This fixes transitive dependencies' usage requirements not appearing
when compiling synthetic targets.

See: https://discourse.cmake.org/t/9819
2024-02-19 10:25:29 -05:00
Brad King
14b0ebd4ca Merge topic 'presets-macro-expander'
741a207717 presets: Refactor macro expander implementation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9252
2024-02-19 09:28:27 -05:00
Brad King
a621340e03 Merge topic 'cxxmodules-nmc-duplicate-synthetic-targets'
5261af9424 cmGeneratorTarget: store synthetic targets in its cache
e0633a9517 Tests/CXXModules: add a test importing from a `Ninja` install
150d7dbd68 Tests/CXXModules: support building a project with `Ninja`
e48e5e5506 Tests/CXXModules: document `CMake_TEST_MODULE_COMPILATION` items

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9263
2024-02-19 09:23:22 -05:00
Brad King
f18ba02d7e Merge topic 'cxxmodules-nmc-duplicate-synthetic-targets' into release-3.29
5261af9424 cmGeneratorTarget: store synthetic targets in its cache
e0633a9517 Tests/CXXModules: add a test importing from a `Ninja` install
150d7dbd68 Tests/CXXModules: support building a project with `Ninja`
e48e5e5506 Tests/CXXModules: document `CMake_TEST_MODULE_COMPILATION` items

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9263
2024-02-19 09:23:21 -05:00
Kitware Robot
be67b4baf2 CMake Nightly Date Stamp 2024-02-19 00:02:02 -05:00
Kitware Robot
e75afeae5c CMake Nightly Date Stamp 2024-02-18 00:01:11 -05:00
Kitware Robot
eb7b504471 CMake Nightly Date Stamp 2024-02-17 00:01:20 -05:00
Ben Boeckel
5261af9424 cmGeneratorTarget: store synthetic targets in its cache
The synthetic target cache was never actually updated, so record them in
the cache so that reuses can actually be discovered.

Fixes: #25568
2024-02-16 11:09:56 -05:00
Brad King
c404c6fa7e Merge topic 'generate-buildable-product-runnable-for-profile-action'
021492038e Xcode: Generate BuildableProductRunnable for ProfileAction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9155
2024-02-16 09:54:43 -05:00
Brad King
b1126ce2d9 Merge topic 'update-kwsys'
c845da5dfb Merge branch 'upstream-KWSys' into update-kwsys
e34aa12e66 KWSys 2024-02-15 (aad06964)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9260
2024-02-16 09:52:28 -05:00
Brad King
7d1356517d Merge topic 'cxxmodules-dyndep-error-on-private-usage'
3f8a59a05c cxxmodules: return failure from the collator when private usage is found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9257
2024-02-16 09:41:27 -05:00
Brad King
0e60e84d35 Merge topic 'cxxmodules-dyndep-error-on-private-usage' into release-3.29
3f8a59a05c cxxmodules: return failure from the collator when private usage is found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9257
2024-02-16 09:41:20 -05:00
Brad King
fb0988a276 Merge topic 'cxxmodules-dyndep-error-on-private-usage' into release-3.28
3f8a59a05c cxxmodules: return failure from the collator when private usage is found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9257
2024-02-16 09:40:07 -05:00
Brad King
d6c81c085c Merge topic 'cxxmodules-collation-restat'
a7424b636b Ninja: make the collator rule use `restat = 1`
e24eecfc33 Tests/CXXModules: add a test to ensure that `restat` works for collation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9259
2024-02-16 09:32:16 -05:00
Brad King
273463aaa9 Merge topic 'cxxmodules-collation-restat' into release-3.29
a7424b636b Ninja: make the collator rule use `restat = 1`
e24eecfc33 Tests/CXXModules: add a test to ensure that `restat` works for collation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9259
2024-02-16 09:32:15 -05:00
Brad King
d713896171 Merge topic 'cxxmodules-collation-restat' into release-3.28
a7424b636b Ninja: make the collator rule use `restat = 1`
e24eecfc33 Tests/CXXModules: add a test to ensure that `restat` works for collation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9259
2024-02-16 09:30:50 -05:00
Brad King
4c4951efa8 Merge topic 'cxxmodules-visibility-change-rebuild'
60a8736378 cmNinjaTargetGenerator: scanning depends on the module metadata
52036ce090 Tests/CXXModules: test that objects depend on dependent modules json files
9a45c9fbd5 cmNinjaTargetGenerator: use `emplace_back` for scanning deps

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9247
2024-02-16 09:26:50 -05:00
Brad King
00fcb1dc81 Merge topic 'cxxmodules-visibility-change-rebuild' into release-3.29
60a8736378 cmNinjaTargetGenerator: scanning depends on the module metadata
52036ce090 Tests/CXXModules: test that objects depend on dependent modules json files
9a45c9fbd5 cmNinjaTargetGenerator: use `emplace_back` for scanning deps

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9247
2024-02-16 09:26:49 -05:00
Brad King
d8fd8c2cb1 Merge topic 'cxxmodules-visibility-change-rebuild' into release-3.28
60a8736378 cmNinjaTargetGenerator: scanning depends on the module metadata
52036ce090 Tests/CXXModules: test that objects depend on dependent modules json files
9a45c9fbd5 cmNinjaTargetGenerator: use `emplace_back` for scanning deps

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9247
2024-02-16 09:22:32 -05:00
Brad King
f8eaf22182 Merge topic 'cxxmodules-depend-on-modmap-file'
363300ace5 cxxmodules: depend on the modmap contents
940628d48d Tests/CXXModules: test that objects depend on their modmap files
681ee92030 Tests/CXXModules: support testing rebuild conditions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9248
2024-02-16 09:20:54 -05:00
Brad King
97132612f6 Merge topic 'cxxmodules-depend-on-modmap-file' into release-3.29
363300ace5 cxxmodules: depend on the modmap contents
940628d48d Tests/CXXModules: test that objects depend on their modmap files
681ee92030 Tests/CXXModules: support testing rebuild conditions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9248
2024-02-16 09:20:52 -05:00
Brad King
2808c49d82 Merge topic 'cxxmodules-depend-on-modmap-file' into release-3.28
363300ace5 cxxmodules: depend on the modmap contents
940628d48d Tests/CXXModules: test that objects depend on their modmap files
681ee92030 Tests/CXXModules: support testing rebuild conditions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9248
2024-02-16 09:20:09 -05:00
Cristian Le
741a207717 presets: Refactor macro expander implementation
Change the macro expander to use vtable dispatch.

Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2024-02-16 07:50:01 -05:00
Kitware Robot
93da029fbf CMake Nightly Date Stamp 2024-02-16 00:01:09 -05:00
Brad King
145d88c612 Merge topic 'cmake-language-exit-code'
86698eea85 cmake_language: Fix EXIT inside control flow blocks
a3033d1a06 Tests: Remove unnecessary RunCMake.cmake_language expected result files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9250
2024-02-15 12:57:57 -05:00