33637 Commits

Author SHA1 Message Date
Brad King
0926ed1f69 CMake 3.26.4 2023-05-18 13:49:44 -04:00
Brad King
624461526f CMake 3.26.3 2023-04-04 14:59:48 -04:00
Brad King
bef6a27531 CMake 3.26.2 2023-03-29 14:19:57 -04:00
Brad King
a67cd9c39c Ninja: Restore slash style for MinGW tools when extra languages are enabled
Since commit f3ca199c9b (cmGlobalNinjaGenerator: Factor out GNU-like
command-line detection on Windows, 2023-03-18, v3.26.1~2^2~6), we
accidentally "unrecognize" MinGW tools on Windows if a language other
than C or CXX is enabled.  This causes the wrong slash style to be
generated in paths in `build.ninja`.

Fixes: #24642
2023-03-27 18:20:23 -04:00
Brad King
01d7860fdb Ninja,Makefile: Restore Fortran module scanning in static library cycle
Since

* commit eed295fd8a (cmGlobalNinjaGenerator: require that dependency info
                     files work, 2023-02-01, v3.26.0-rc1~1^2~1), and
* commit 13810dee17 (cmDependsFortran: require that dependency info files
                     work, 2023-02-01, v3.26.0-rc1~1^2),

the Ninja and Makefile generators' module dependency scanning requires
that scanning results from from linked targets is available before
scanning the current target.  In the case of a static library cycle,
we cannot expect this information from other static libraries in the
cycle.  Previously we supported cyclic cases at the cost of silently
ignoring missing information.

We already compute a global order of targets that respects all
`add_dependencies`, but may break `target_link_libraries` dependencies
that occur in a static library cycle.  Use this order to filter the
linked targets so we only expect scanning results to be available from
those targets that build before the current target.

This approach is sufficient to support module dependency scanning in
static library cycles as long as module dependencies do not cross
between two libraries in the same cycle.

Fixes: #24631
2023-03-24 15:57:52 -04:00
Brad King
846baa7c5b cmGlobalGenerator: Factor out helper to check target ordering 2023-03-24 15:57:52 -04:00
Brad King
fae6e8c2cd CMake 3.26.1 2023-03-23 09:12:04 -04:00
Brad King
1b7c26da49 Ninja: Wrap rules using '>' shell redirection with 'cmd /C' on Windows
This is needed for the clang-scan-deps rule added by commit 0e21e55fc5
(Clang: Record Clang 16.0 C++ modules flags only for GNU-like front-end,
2023-03-16).

Fixes: #24611
2023-03-20 13:13:30 -04:00
Brad King
6013227230 cmGlobalNinjaGenerator: Use forward slashes in clang modmap format on Windows
Issue: #24611
2023-03-18 11:52:42 -04:00
Brad King
d9d74b5e8a cmDyndepCollation: Drop outdated mentions of CXX_MODULE_INTERNAL_PARTITIONS
These were left from an older design iteration in which, for MSVC, we
needed to distinguish `cl -internalPartition` from `cl -interface`
before scanning.  It is no longer needed since `cl -scanDependencies`
was updated to use the standard-conforming interpretation of
non-exported module partition syntax.

Issue: #24611
2023-03-18 11:52:42 -04:00
Brad King
edab56d29a cmLocalNinjaGenerator: De-duplicate condition for using 'cmd /C' on Windows 2023-03-18 11:52:41 -04:00
Brad King
8ebe3f92b3 cmGlobalNinjaGenerator: Detect GNU-like command-line for dyndep collator
This will help the collator choose flags and path styles for modmap
files.
2023-03-18 11:52:41 -04:00
Brad King
f3ca199c9b cmGlobalNinjaGenerator: Factor out GNU-like command-line detection on Windows 2023-03-18 11:52:41 -04:00
Brad King
f79817fcf0 cmCxxModuleMapper: Use value semantics in path conversion callback
The call site already owns a path it doesn't need when the callback
returns.  Hand ownership to the callback so it can optionally mutate
the path without necessarily allocating.
2023-03-18 11:52:41 -04:00
Brad King
5ab002ea11 cmCxxModuleMapper: Remove redundant path conversion callbacks
Two calls to `PathForGenerator` were applied to values returned by
`BmiGeneratorPathForModule`, that already calls `PathForGenerator`.
2023-03-18 11:52:41 -04:00
Brad King
6c71fa6d56 CMake 3.26.0 2023-03-14 10:04:14 -04:00
Brad King
685108a582 Ninja: Revert "Optimize target depends closure" due to performance regression
Revert commit 1f16af01f4 (cmGlobalNinjaGenerator: Optimize target
depends closure, 2023-01-17, v3.26.0-rc1~74^2).  It regressed generation
time for some projects.  Revert it pending further investigation.
2023-03-10 15:13:23 -05:00
Brad King
454bfa77b2 CMake 3.26.0-rc6 2023-03-08 14:04:09 -05:00
Brad King
cea9dae92a Merge topic 'revert-vs-BuildInParallel' into release-3.26
abb1c12162 VS: Revert "Build custom commands concurrently when possible"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8297
2023-03-08 08:56:28 -05:00
Brad King
abb1c12162 VS: Revert "Build custom commands concurrently when possible"
Since commit 33c15ae2b9 (VS: Build custom commands concurrently when
possible, 2023-01-19, v3.26.0-rc1~56^2) we add `BuildInParallel` to
custom commands in `.vcxproj` files.  However, this can break existing
projects that implicitly rely on serial execution of custom commands.
For example, custom commands in our FindCUDA module run MSVC (via nvcc)
with a common `vc*.pdb` file, and therefore cannot run in parallel.

Revert use of `BuildInParallel` while leaving most of the infrastructure
for it in place.  It can be restored later with an option or policy.

Fixes: #24576
Issue: #18405
2023-03-07 14:19:49 -05:00
Brad King
35f2b1bf5b file(INSTALL): Fix file ownership regression when running as root on macOS
Backport KWSys commit `51272e80e` (SystemTools: Avoid macOS copyfile
semantic differences as root, 2023-03-07).

Fixes: #24577
2023-03-07 11:39:58 -05:00
Brad King
6c0b3d2b7e CMake 3.26.0-rc5 2023-03-01 09:43:05 -05:00
Brad King
d70582eed8 ccmake: Update minimum required version of CMake for curses check
This should have been part of commit d6b811fb82 (Require CMake 3.13+ to
configure CMake itself, 2022-02-22, v3.24.0-rc1~605^2~1).
2023-03-01 09:15:38 -05:00
Brad King
67a1e2a5d1 CMake 3.26.0-rc4 2023-02-22 10:06:26 -05:00
Brad King
3b3f2e920b Merge topic 'xcode-revert-header-map' into release-3.26
841272eb35 Xcode: Restore suppression of header maps

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8218
2023-02-20 08:32:10 -05:00
Brad King
841272eb35 Xcode: Restore suppression of header maps
In commit 8527f42b96 (Xcode: Explicitly disable deprecated user include
path feature, 2023-01-31, v3.26.0-rc1~7^2) we dropped the Xcode build
setting `USE_HEADERMAP = NO` because Xcode 14's "Build Documentation"
feature (`xcodebuild RUN_DOCUMENTATION_COMPILER=YES`) fails in some
cases without header maps.  However, enabling header maps causes Xcode
to add `-iquote .../foo.hmap` and `-I .../bar.hmap` flags that can
change the intended header file search order based on the contents of
the header maps.  This can break existing projects.  Restore the
`USE_HEADERMAP = NO` setting to fix the header file search order.

Further investigation will be needed to resolve the problematic cases
with the Xcode 14 "Build Documentation" feature.  Meanwhile projects
encountering such cases can set the `XCODE_ATTRIBUTE_USE_HEADERMAP`
target property to `YES` themselves.

Fixes: #24418
Issue: #24379
2023-02-17 18:02:45 -05:00
Chuanqi Xu
195ee13710 cmCxxModuleMapper: Specify clang's BMI dependency with new form 2023-02-17 12:27:37 -05:00
Brad King
037975ef69 CMake 3.26.0-rc3 2023-02-15 09:34:02 -05:00
Brad King
29bcbcab4f CMake 3.26.0-rc2 2023-02-09 14:21:24 -05:00
Brad King
7f90210dd6 Merge topic 'stop_parsing_after_first_script_arg' into release-3.26
f9e8a067c2 cmake: Stop parsing after `--` when detecting script mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8186
2023-02-09 09:58:13 -05:00
Robert Maynard
f9e8a067c2 cmake: Stop parsing after -- when detecting script mode
The fix in commit 08aa516880 (cmake: Stop parsing after `--` when
detecting script mode, 2022-12-06, v3.26.0-rc1~216^2) only corrected the
case where `-P -- -P <arg>` occurred and not `-P -- -P -<other>`.

Fixes: #24220
2023-02-08 17:21:10 -05:00
Joerg Bornemann
d0f49327f9 AutoMoc: Fix verbose mode message
AutoMoc generates because moc settings changed, not uic.
2023-02-07 10:59:51 -05:00
Brad King
2a0c105cf0 CMake 3.26.0-rc1 2023-02-02 13:20:23 -05:00
Brad King
371417f4b0 Merge topic 'modules-lang-specific-target-linked-dirs' into release-3.26
13810dee17 cmDependsFortran: require that dependency info files work
eed295fd8a cmGlobalNinjaGenerator: require that dependency info files work
837f7c113a cmCommonTargetGenerator: classify linked target directories by language
d19648a928 cmGeneratorTarget: add a method to query if Fortran sources exist
245a89d8b6 cmMakefileTargetGenerator: make "target linked info" variable Fortran-specific
aeb1b2ae3d cmMakefileTargetGenerator: simplify string streaming

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8146
2023-02-02 11:46:44 -05:00
Brad King
c01d01646a Begin 3.26 release versioning 2023-02-01 14:43:09 -05:00
Brad King
5252c88569 try_compile: Record propagated CMake variables in configure log
These provide more detailed information about how the test project was
configured.

Issue: #23200
2023-02-01 09:32:42 -05:00
Brad King
0a48d8fe5c ConfigureLog: De-duplicate event backtrace and check key generation
All event kinds have these fields, so centralize their implementation.
2023-02-01 09:32:42 -05:00
Ben Boeckel
13810dee17 cmDependsFortran: require that dependency info files work
Now that only targets expected to have information are listed, all
`DependInfo.cmake` files should exist.
2023-02-01 09:13:51 -05:00
Brad King
11d59c9ed6 Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2023-02-01 (cafea4c8)
2023-02-01 09:12:57 -05:00
Ben Boeckel
eed295fd8a cmGlobalNinjaGenerator: require that dependency info files work
Now that only targets expected to have information are listed, all
`<LANG>Modules.json` files should exist.
2023-02-01 09:12:49 -05:00
Brad King
0292cf3c96 Merge topic 'xcode-header-search'
8527f42b96 Xcode: Explicitly disable deprecated user include path feature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8143
2023-02-01 09:11:45 -05:00
Brad King
a58b0baca2 Merge topic 'cmTarget-refactorings'
33f629184f cmTarget: simplify `CheckLinkLibraryPattern`
22b9ce73e7 cmTarget: refactor INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE usage requirements
332d2f8f52 cmTarget: refactor INTERFACE_LINK_LIBRARIES_DIRECT usage requirements
15eec07500 cmTarget: refactor INTERFACE_LINK_LIBRARIES usage requirements
e80689d101 cmTarget: refactor LINK_LIBRARIES usage requirements
4f009d2121 cmTarget: refactor LINK_DIRECTORIES usage requirements
99e783e735 cmTarget: refactor LINK_OPTIONS usage requirements
fd295dd263 cmTarget: refactor SOURCES usage requirements
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8127
2023-02-01 09:07:58 -05:00
Brad King
29d19e0e5a Merge topic 'cmTarget-property-grouping'
a7c29f3ebd cmTarget: use static string views for per-config properties
47315d817c cmTarget: group remaining properties
32d21f215f cmTarget: put build graph-related properties into a group
6f9821d179 cmTarget: put static analysis (co-compile) properties in a group
ead9ff61f9 cmTarget: put linking-related properties in a group
9bb824a237 cmTarget: put compile-related properties in a group

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8135
2023-02-01 09:07:06 -05:00
Brad King
6b2c52b25b Merge topic 'ccg-index-type'
91a26ce041 cmComputeComponentGraph: use `size_t` for component indices
65c0a64dc5 cmComputeComponentGraph: use a name for "invalid component"
50abdaab93 IWYU: exclude `__decay_and_strip<int>` as well

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8128
2023-02-01 09:06:07 -05:00
Kitware Robot
4e9db2a8fa CMake Nightly Date Stamp 2023-02-01 00:01:16 -05:00
Ben Boeckel
837f7c113a cmCommonTargetGenerator: classify linked target directories by language
These directories are used to direct collators for Fortran and C++
modules to consume dependent module information to properly collate.
However, the consumption of these files merely checks for existence of
the file, not whether they are actually needed anymore.

The problem arises when a target has Fortran or C++ modules at point A,
a build occurs populating this file, and then the target is updated to
no longer have potential modules. The `DependInfo.make` (for
`Makefiles`) or `<LANG>DependInfo.json` (for `Ninja`) files still exist
as they are never guaranteed to be cleaned up. This can introduce stale
information to the build which may cause a false-positive compilation if
a module file happens to still exist and gets found this way.

Instead, query the `linked-target-dirs` using the language in question
and only add the directory if it contains potential sources for modules
coming from the language in question.
2023-01-31 22:34:29 -05:00
Ben Boeckel
d19648a928 cmGeneratorTarget: add a method to query if Fortran sources exist 2023-01-31 22:23:36 -05:00
Ben Boeckel
245a89d8b6 cmMakefileTargetGenerator: make "target linked info" variable Fortran-specific
This variable is Fortran-specific, so clarify that through its name.
2023-01-31 22:23:36 -05:00
Ben Boeckel
aeb1b2ae3d cmMakefileTargetGenerator: simplify string streaming 2023-01-31 22:23:36 -05:00
Brad King
8527f42b96 Xcode: Explicitly disable deprecated user include path feature
The `ALWAYS_SEARCH_USER_PATHS` feature is documented [1] to search the
paths in `USER_HEADER_SEARCH_PATHS` before `HEADER_SEARCH_PATHS`.  The
behavior has been long discouraged and was deprecated by Xcode 8.3.
Furthermore, Xcode explicitly disables this setting when creating new
projects.  We can do that too since we do not generate any user header
search paths anyway.

Previously we always set `USE_HEADERMAP` to `NO` to prevent Xcode's
warning about an ancient "header map" feature deprecation.  However,
this somehow breaks Xcode 14's "Build Documentation" feature.  Setting
`ALWAYS_SEARCH_USER_PATHS` to `NO` seems to prevent the header map
warning too, so drop `USE_HEADERMAP` to fix the documentation feature.

[1] https://developer.apple.com/documentation/xcode/build-settings-reference

Fixes: #24379
2023-01-31 14:21:20 -05:00