Commit Graph

35210 Commits

Author SHA1 Message Date
Brad King 16f88908a6 Merge topic 'cmake-gui_support_preset_toolchain'
370370364b cmake-gui: Add support for preset toolchain entry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9126
2024-01-08 09:33:03 -05:00
Brad King 639a5998c7 Merge topic 'fix-openbsd'
1fafe35e81 Source: Restore compilation on OpenBSD

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9085
2024-01-08 09:30:56 -05:00
Kitware Robot 733d2b6063 CMake Nightly Date Stamp 2024-01-08 00:01:18 -05:00
Kitware Robot 56718903bb CMake Nightly Date Stamp 2024-01-07 00:01:05 -05:00
Ben Boeckel 029ddc3410 cmVisualStudio10TargetGenerator: always specify scanning
Set that sources should not be scanned on a target-wide basis and then
enable on a per-TU basis as needed.

Fixes: #25519
2024-01-06 11:18:57 -05:00
Ben Boeckel 34f4423851 cmVisualStudio10TargetGenerator: fix typo in flag name
It is case insensitive, so this only matches the official flag name and
still works.
2024-01-06 11:18:57 -05:00
Ben Boeckel de3dc16b64 cmNinjaTargetGenerator: use . for the needed phony order-only dependency
It is only required for Ninja < 1.7 though.
2024-01-06 11:07:52 -05:00
Ben Boeckel 1aa28f3b92 cmNinjaTargetGenerator: ensure that the object output directory exists
If a target has no object compilations within it, nothing ensures that
the directory exists yet it is still mentioned as an order-only
dependency within the build files. While `ninja` is OK with this,
`samu`, an alternate `ninja` implementation, is not. Make sure the
directory always exists for consistency.

Fixes: #25526
2024-01-06 09:56:40 -05:00
Kitware Robot a8c09ab5f5 CMake Nightly Date Stamp 2024-01-06 00:01:08 -05:00
Robert Maynard 63e20653f8 add_test: Fix version of CMake introducing CMP0158 (to 3.29)
This was missed in commit ca5a300d7f (add_test: Honor
CROSSCOMPILING_EMULATOR only when cross-compiling, 2023-11-02) when it
slipped from the 3.28 release.
2024-01-05 17:01:01 -05:00
Rafael Sadowski 1fafe35e81 Source: Restore compilation on OpenBSD
We cannot use `OpenBSD` as a name, it is defined in `sys/param.h`.
2024-01-05 15:36:44 -05:00
leha-bot 5e8c176e2a cmExecuteProcessCommand: Cast c to unsigned char before cast to int
As the 'char' type may be either signed, or unsigned, there are some
clashes between C Standard library functions and actual characters while
casting it to int directly. In case the 'char' type was signed, the
casted to int result value may be extended to full negative digit which
may be out of range of isspace() function (e.g. , for MSVC
implementation, which checks it for '> -1', and throwing an assertion
failure on fail).

Fixes: #25561
2024-01-05 14:36:43 -05:00
Ben Boeckel 63bbb3768d cmLocalGenerator: ignore scanned sources for unity builds 2024-01-05 14:21:27 -05:00
Ben Boeckel 76b5383123 cmGlobalGenerator: add unity sources after computing target compile features
We need to know which sources will be scanned for C++ module
dependencies in order to exclude them from unity builds.  The
addition of unity sources will not change the set of features.
2024-01-05 14:19:42 -05:00
Brad King ac9fd4f009 Merge topic 'swift-always-restat'
1161ad76ac Swift/Ninja: Always restat swift build commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9076
2024-01-05 13:31:09 -05:00
Brad King 7058d715b4 Merge topic 'swift-compile-commands'
44f29a4291 Swift/Ninja: Fix multifile module compile commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9095
2024-01-05 13:30:15 -05:00
Robert Maynard 9d13674337 cmake-gui: Hint that the preset compilers will be used
Instead of stating that the default is the native compilers,
say we will use the compilers from the preset. This makes it
more clear that the preset is working as expected.
2024-01-05 12:04:12 -05:00
Robert Maynard 370370364b cmake-gui: Add support for preset toolchain entry
Previously the toolchain field was ignored when passing a preset
to cmake-gui.

Fixes: #24034
2024-01-05 12:01:44 -05:00
Brad King 601e16c7c5 Merge topic 'ccmake_support_preset_toolchain'
d20c21a678 ccmake: Now supports the preset toolchain entry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9127
2024-01-05 10:20:39 -05:00
Ben Boeckel 4a9613ff9b cmNinjaTargetGenerator: add a method to compute the object directory 2024-01-05 05:06:33 -05:00
Kitware Robot 159872ab8b CMake Nightly Date Stamp 2024-01-05 00:01:08 -05:00
Jeremy Day 1161ad76ac Swift/Ninja: Always restat swift build commands
The swift toolchain leaves output files untouched
if there are no meaningful input changes; without
restat, this causes ninja to needlessly rebuild
targets that are not actually out-of-date

Fixes: #25496
2024-01-04 13:20:05 -08:00
Brad King 2c6ec6de15 Link to transitive dependencies on stub libraries only on some linkers
Only linkers that enforce `--no-allow-shlib-undefined` recursively need
to link private transitive dependencies on stub libraries explicitly.
2024-01-04 11:59:26 -05:00
Brad King dd4a6dff92 Link explicitly to private transitive dependencies on stub libraries
We represent stub libraries, e.g., for CUDA, using imported `SHARED`
library targets with only `IMPORTED_IMPLIB`, and no `IMPORTED_LOCATION`,
to indicate that the stub file is meant only for linkers and not dynamic
loaders.  See commit 7351d590ee (cmTarget: Add a way to represent
imported shared library stubs, 2023-07-17, v3.28.0-rc1~344^2) and commit
fc6508921c (cmComputeLinkInformation: Restore soname lookup for
non-imported targets, 2023-12-05, v3.28.0~4^2).

If a shared library is linked to a stub, it has a `NEEDED` field
populated with the `SONAME` found in the stub.  When a dependent target
links to such a shared library, some linkers want to find a library file
on disk and load it to see what symbols it provides.  This is necessary
for linkers that enforce `--no-allow-shlib-undefined`.  On hosts with
only the stub library installed, e.g., with only the CUDA toolkit
development package, the real runtime library corresponding to the
stub's `SONAME` may not even exist, so no `-rpath-link` flag can help
linkers find it.  Pass the stub library to linkers explicitly so they
can find it without searching.
2024-01-04 11:59:26 -05:00
Kitware Robot 31dead97ed CMake Nightly Date Stamp 2024-01-04 00:01:11 -05:00
Evan Wilde 44f29a4291 Swift/Ninja: Fix multifile module compile commands
Swift compile commands need to have all source files in the module
specified in the compile command or LSP systems will report errors on
missing types that are defined in other source files in the same module.

Issue: #25491
2024-01-03 14:57:46 -08:00
Robert Maynard d20c21a678 ccmake: Now supports the preset toolchain entry
Previously the toolchain field was ignored when passing a preset
to ccmake.
2024-01-03 14:46:33 -05:00
Brad King 040ee747c3 Merge topic 'cxxmodules-no-compile-commands-modmap'
eebf239d9c Merge branch 'cxxmodules-no-compile-commands-modmap-release' into cxxmodules-no-compile-commands-modmap
73fbad3d93 cmNinjaTargetGenerator: use scan flag for modmap usage in exported commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9100
2024-01-03 13:53:05 -05:00
Brad King a0a5a5b85a Merge topic 'cxxmodules-no-compile-commands-modmap' into release-3.28
73fbad3d93 cmNinjaTargetGenerator: use scan flag for modmap usage in exported commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9100
2024-01-03 13:53:04 -05:00
Craig Scott 4a76154e05 Merge topic 'cxxmodules-error-message-improvement'
4962eba981 cmDyndepCollation: clarify CXX_MODULES-without-BMI error message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Yaraslau <yaraslau.tamashevich@gmail.com>
Merge-request: !9103
2024-01-03 07:19:09 -05:00
Kitware Robot 63cd112063 CMake Nightly Date Stamp 2024-01-03 00:01:06 -05:00
Kitware Robot 9841c4d879 CMake Nightly Date Stamp 2024-01-02 00:01:06 -05:00
Kitware Robot bd20084b6a CMake Nightly Date Stamp 2024-01-01 00:01:33 -05:00
Kitware Robot aea1365e6f CMake Nightly Date Stamp 2023-12-31 00:01:06 -05:00
Kitware Robot 76b585ecc8 CMake Nightly Date Stamp 2023-12-30 00:01:06 -05:00
Kitware Robot 8dc21f4b5a CMake Nightly Date Stamp 2023-12-29 00:01:05 -05:00
Ben Boeckel eebf239d9c Merge branch 'cxxmodules-no-compile-commands-modmap-release' into cxxmodules-no-compile-commands-modmap
* cxxmodules-no-compile-commands-modmap-release:
  cmNinjaTargetGenerator: use scan flag for modmap usage in exported commands
2023-12-28 10:58:35 -05:00
Kitware Robot 158ecdced2 CMake Nightly Date Stamp 2023-12-28 00:01:06 -05:00
Kitware Robot 74f1e6612e CMake Nightly Date Stamp 2023-12-27 00:01:05 -05:00
Ben Boeckel 4962eba981 cmDyndepCollation: clarify CXX_MODULES-without-BMI error message
Fixes: #25493
2023-12-26 11:07:15 -05:00
Kitware Robot b2ea53f484 CMake Nightly Date Stamp 2023-12-26 00:01:10 -05:00
Kitware Robot 0064ac4a55 CMake Nightly Date Stamp 2023-12-25 00:01:28 -05:00
Kitware Robot 1e37448710 CMake Nightly Date Stamp 2023-12-24 00:01:07 -05:00
Marc Chevrier 179c036b5d Merge topic 'Ninja-LINK_OPTIONS-with-newlines'
255c2e1430 Ninja: LINK_OPTIONS property should support newlines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9096
2023-12-23 05:39:10 -05:00
Kitware Robot 6d578ab5f8 CMake Nightly Date Stamp 2023-12-23 00:01:06 -05:00
Ben Boeckel 73fbad3d93 cmNinjaTargetGenerator: use scan flag for modmap usage in exported commands
See: https://discourse.cmake.org/t/how-to-control-the-location-of-the-c-20-binary-module-interface-bmi-output-directory/7968
2023-12-22 16:18:18 -05:00
Kitware Robot 421cc38a54 CMake Nightly Date Stamp 2023-12-22 00:01:04 -05:00
Kitware Robot f8b165dcd6 CMake Nightly Date Stamp 2023-12-21 00:01:06 -05:00
Marc Chevrier 255c2e1430 Ninja: LINK_OPTIONS property should support newlines
Fixes: #25513
2023-12-20 17:05:09 +01:00
Brad King 30a56df0a8 Merge topic 'cmake-presets-empty-architecture'
0654051dde CMakePresets.json: Don't use architecture and toolset if empty

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9093
2023-12-20 09:11:20 -05:00