Commit Graph

40 Commits

Author SHA1 Message Date
Vito Gamberini
ea6404b9c4 FileAPI: Ignore unresolved FileSet generators
Fixes: #27054
2025-07-09 10:08:47 -04:00
Stefan Wüthrich
1ae7497b6a fileapi: Restrict reply object file path lengths
Fixes: #23389
2025-01-27 09:49:19 +01:00
Garrett Campbell
0a9fb88121 fileapi: Report DEBUGGER_WORKING_DIRECTORY in codemodel-v2 target objects
Closes: #16478
2024-12-10 09:04:31 -05:00
Brad King
655a245d60 Tests: Explicitly disable AIX_SHARED_LIBRARY_ARCHIVE in some cases
We do not want AIX shared library archives in test cases that rely on
cross-platform appearance of `.so` files.
2024-11-23 15:23:25 -05:00
Brad King
7b19531291 macOS: Do not pass any SDK/-isysroot to compilers by default
On modern macOS, compiler wrappers like `/usr/bin/cc` automatically
choose a SDK to pass via `-isysroot` to an underlying compiler from
Xcode or the CommandLineTools.  Other toolchains like Homebrew's `gcc-*`
come with a default SDK too.  Therefore, when targeting macOS, we no
longer need to choose any SDK or pass an `-isysroot` flag by default.

Update initialization of `CMAKE_OSX_SYSROOT` to be empty by default when
targeting macOS.

Fixes: #19180
2024-11-07 09:46:10 -05:00
Marc Chevrier
61aee8c7bd Add support of "LINKER:" prefix for Windows executable creation
The following variables now support the LINKER: prefix:
* CMAKE_<LANG>_CREATE_WIN32_EXE
* CMAKE_<LANG>_CREATE_CONSOLE_EXE
2024-11-04 17:08:03 +01:00
Ralf Habacker
88863d83d6 fileapi: Add test launcher to codemodel-v2
We do not need to bump the minor version because it was recently bumped
by addition of the cross-compiling emulator as another kind of launcher.
2023-12-13 10:20:43 -05:00
Ralf Habacker
478a5f4e04 fileapi: Make launcher attribute 'arguments' optional
This was missed in commit 80a64c9ce5 (fileapi: Add cross-compiling
emulator to codemodel-v2, 2023-11-11).
2023-12-13 10:20:41 -05:00
Ralf Habacker
80a64c9ce5 fileapi: Add cross-compiling emulator to codemodel-v2
Fixes: #25408
2023-12-01 10:57:15 -05:00
Brad King
b6845a689e Merge topic 'fileapi-file-sets-base-dirs-relative'
a3a85524cd fileapi: Fix file sets' base directories relative to top source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8977
2023-11-20 09:13:01 -05:00
Kyle Edwards
a3a85524cd fileapi: Fix file sets' base directories relative to top source
This field was added by commit b3e9fb67bb (file-api: support exporting
file set information, 2022-11-03, v3.26.0-rc1~389^2) but the relative
path convention used elsewhere was accidentally left out.

Fixes: #25422
2023-11-17 07:59:05 -05:00
Ben Boeckel
0c07f39006 cmExperimental: remove the flag for C++ modules
All the major compilers now have scheduled releases with support for
scanning, so remove the experimental gate.

Fixes: #18355
2023-10-02 10:17:31 -04: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
Marc Chevrier
3bdf95f942 macOS: GNU toolchain: ensure framework, marked as SYSTEM, can be linked
Fixes: #25263
2023-09-21 16:29:40 +02:00
Kyle Edwards
e1fe5bb475 Tests: Fix FileAPI interface_exe test 2023-09-01 14:02:44 -04:00
Marc Chevrier
b3a6a11e95 fileapi: Extend codemodel targets/compileGroups with Apple frameworks
Fixes: #19897
2023-05-19 12:10:20 +02:00
Ben Boeckel
b3e9fb67bb file-api: support exporting file set information
This includes listing the filesets themselves as well as which file set
(if any) each source file is associated with.

Fixes: #24128
2022-11-08 10:07:10 -05:00
Brad King
024e3d2bf6 Xcode: Put object files in a place that Xcode cleans
Since commit dc5fc898f6 (Xcode: Set object file locations using
TARGET_TEMP_DIR, 2022-09-29, v3.25.0-rc1~64^2~1), `xcodebuild clean`
does not remove the object files in our explicit `TARGET_TEMP_DIR`
because it is not under the `SYMROOT`.  Put it there.

Fixes: #24096
2022-10-28 15:38:07 -04:00
Brad King
52c95540b7 target_*: Fix cross-directory call backtraces
Record the call-site backtrace, not the current backtrace of the
target's directory.

Fixes: #23873
2022-08-22 15:29:43 -04:00
Brad King
0d64c3abd1 Tests: Add FileAPI case for cross-directory target_* commands
The backtraces for some of the commands incorrectly come from the
target's directory instead of the caller's directory.  Expect the
incorrect backtraces in test results for now.

Increase the minimum required version of CMake in the test case
to enable policy CMP0079 to support cross-directory calls.

Issue: #23873
2022-08-22 14:51:16 -04:00
Ben Boeckel
c5b56b35c2 cmInstallExportGenerator: expose the temporary directory
This needs to be known so that C++ module properties for the install can
be staged beside the other files.

Always perform the MD5 transformation (in non-bootstrap builds) so that
the path can be computed prior to generation (where it used the longest
configuration name to detect too-long paths). Update tests to expect the
always-present MD5 value. Note that this improves robustness of the test
suite as testing in a too-long path may have triggered the MD5
conversion anyways.
2022-04-28 09:13:48 -04:00
Kyle Edwards
3c3698b0e4 FileAPI: Add information on file set installers 2021-10-27 15:17:23 -04:00
Kyle Edwards
8d898cb3e1 FileAPI: Add integration for runtime dependency installers 2021-06-04 15:25:18 -04:00
Kyle Edwards
f7ba3a0589 FileAPI: Populate information for IMPORTED_RUNTIME_ARTIFACTS 2021-05-31 09:02:45 -04:00
Nils Gladitz
99ff75455e install: Implement new install(CODE|SCRIPT) option ALL_COMPONENTS
In a per-component installation the generated installation scripts
are invoked once for each component.

Per default custom installation script code added by install(CODE|SCRIPT)
only runs for one specific component in this context.

The new ALL_COMPONENTS option allows custom script code to be run once
for each component being installed.
2021-05-19 19:17:58 +02:00
Orgad Shaneh
ddcd1469e8 MSYS: Add support for running under MSYS runtime environment
Detect MSYS as CYGWIN, with the required adaptations.
2021-04-26 14:27:34 -04:00
Brad King
049bf98f63 fileapi: Add installers to codemodel-v2 "directory" object
Co-Authored-by: Kyle Edwards <kyle.edwards@kitware.com>
2021-03-16 16:47:57 -04:00
Brad King
a12d7f70b1 fileapi: Add a "directory" object to codemodel-v2
This object will contain more detailed directory-level information.

Co-Authored-by: Kyle Edwards <kyle.edwards@kitware.com>
2021-03-16 16:47:43 -04:00
Kyle Edwards
dcf9f4d2f7 Ninja Multi-Config: Add support for cross-config custom commands
Co-Author: Brad King <brad.king@kitware.com>
2020-12-15 07:01:21 -05:00
Raul Tambre
359c500a24 cmTarget: Raise error if imported target location is not set
Previously we would synthesize <TARGET_NAME>-NOTFOUND as the location. This
would then end up on the link line and cause build failures.
Policy CMP0110 is added to control this behaviour.

Fixes #19080, #19943.
2020-08-21 08:38:39 -04:00
Brad King
bafa9fe887 fileapi: Add INTERFACE libraries with SOURCES to codemodel-v2
INTERFACE libraries with SOURCES now appear in the generated
buildsystem, so include them in the codemodel output too.

We do not need to bump the `codemodel-v2` object kind minor
version because that was already done in post-3.18 development
by commit 7d6861f367 (fileapi: Extend codemodel targets with
language standard, 2020-06-18).

Fixes: #18608
2020-08-07 08:46:34 -04:00
Justin Goshi
2f383d852d fileapi: Support multiple backtraces for language standard 2020-07-06 11:40:39 -07:00
Justin Goshi
7d6861f367 fileapi: Extend codemodel targets with language standard 2020-06-26 08:52:29 -04:00
Justin Goshi
9f6d40ee23 fileapi: Extend codemodel targets with PRECOMPILE_HEADERS 2020-05-22 11:26:55 -04:00
Justin Goshi
b698764a31 Tests: Add a PCH example to RunCMake.FileAPI codemodel-v2 2020-05-22 11:23:33 -04:00
Brad King
b3812c0e54 Tests: Fix indentation in RunCMake.FileAPI cxx_exe.json 2020-05-22 10:07:30 -04:00
Brad King
a833aa1167 Fix dependencies on targets linked through object libraries
When an object library is used via `target_link_libraries`, any targets
listed in the object library's `INTERFACE_LINK_LIBRARIES` closure should
become direct dependencies of the consuming target.  However, these were
accidentally left out by `cmComputeTargetDepends::CollectTargetDepends`
because object libraries are encountered through external object sources
first and then added to the `emitted` set which blocks them from being
processed as link dependencies.

This was not noticed by the test case in commit bab24e782c
(target_link_libraries: Propagate dependencies of object libraries,
2018-12-10, v3.14.0-rc1~260^2) because the relevant dependency appears
transitively through the object library target itself.

Re-order the logic to process link dependencies first, and then external
object sources.  That way object libraries used via
`target_link_libraries` will be treated as such by dependency analysis.

This also adds missing backtrace information for object libraries used
via `target_link_libraries`.  The missing information was mentioned in a
FIXME comment in the RunCMake.FileAPI test added by commit ea0a060168
(fileapi: Add test for codemodel v2, 2018-11-09, v3.14.0-rc1~257^2~7).
That comment itself was dropped by commit a0de350e2f (FileAPI test:
Break gen_check_targets() into JSON files, 2020-02-07), but we can now
update the corresponding location in the `.json` files to have the
now-expected backtrace information.

Fixes: #20421
2020-03-04 13:07:41 -05:00
Kyle Edwards
75e71263e7 FileAPI test: Break gen_check_projects() into JSON files 2020-02-07 13:42:20 -05:00
Kyle Edwards
a0de350e2f FileAPI test: Break gen_check_targets() into JSON files 2020-02-07 13:37:15 -05:00
Kyle Edwards
de8ebc9dba FileAPI test: Break gen_check_directories() into JSON files 2020-02-07 11:17:23 -05:00