Commit Graph

11919 Commits

Author SHA1 Message Date
makise-homura
68d730bcff Tests: switch off some RunCMake tests for broken libc on e2k
Some old OS Elbrus installations (e.g. 6.0.1) have libc that
tends to behave incorrectly in some rare cases. This prevents
some tests from being run correctly:
- RunCMake.Graphviz, test no_module_libs
- RunCMake.Syntax, test EscapeCharsDisallowed
These tests are now not run in case of such libc.
2025-01-17 07:37:23 +03:00
Brad King
1d5c1b0023 Merge topic 'policy-cleanup'
b010a1fb1d Help: Update try_compile list of automatic policies
5e9b40b6a5 Help: Update cmake-buildsystem(7) TARGET_POLICY example to a newer policy
9ffbc0e628 Tests/RunCMake/cmake_minimum_required: Generalize deprecated version case name
0eca249ac7 Tests/RunCMake: Update more cmake_minimum_required versions to 3.10
a8cf033a74 Tests/RunCMake/return: Use newer cmake_minimum_required VERSION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10178
2025-01-16 09:01:48 -05:00
Brad King
e87c6c6259 Merge topic 'execute-process-error'
3ece058d97 execute_process: Allow setting default COMMAND_ERROR_IS_FATAL value
85035dd954 Help/command/execute_process: Fix definition list formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10169
2025-01-16 08:59:00 -05:00
Brad King
8018f2a6c4 Merge topic 'instrumentation'
097d4fd1b5 instrumentation: Collect and record project build system metrics
8a3c195188 Tests/RunCMake: Add RunCMake_CHECK_ONLY Option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9791
2025-01-16 08:55:25 -05:00
Brad King
a41b1d66cd Merge topic 'test-mingw-no-vs'
a62313b1dd Tests: Fix testing with MinGW without VS installed
a02b70a23f Tests: Forward tested CMake generator to more cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10170
2025-01-16 08:42:55 -05:00
Brad King
9ffbc0e628 Tests/RunCMake/cmake_minimum_required: Generalize deprecated version case name 2025-01-15 11:21:21 -05:00
Brad King
0eca249ac7 Tests/RunCMake: Update more cmake_minimum_required versions to 3.10
These were missed in commit f4aa34daa7 (Tests/RunCMake: Update
cmake_minimum_required versions to 3.10, 2024-10-02,
v3.31.0-rc1~23^2~2).
2025-01-15 11:21:21 -05:00
Brad King
a8cf033a74 Tests/RunCMake/return: Use newer cmake_minimum_required VERSION 2025-01-15 11:21:20 -05:00
Martin Duffy
3ece058d97 execute_process: Allow setting default COMMAND_ERROR_IS_FATAL value
Issue: #26576
2025-01-15 11:12:34 -05:00
Martin Duffy
097d4fd1b5 instrumentation: Collect and record project build system metrics
Add a feature for collecting build instrumentation for CMake projects.

Issue: #26099
2025-01-15 09:16:50 -05:00
Brad King
a62313b1dd Tests: Fix testing with MinGW without VS installed 2025-01-15 08:21:31 -05:00
Brad King
a02b70a23f Tests: Forward tested CMake generator to more cases 2025-01-15 08:21:31 -05:00
Brad King
72e27a4856 Merge topic 'fix-typos-found-by-pre-commit-hooks'
d620d77d26 FindDoxygen: Rename `_Doxygen_dne_header` -> `_Doxygen_do_not_edit_header`
e7ff3cccea PushToAndroidDevice.cmake: Rename `cmake_parse_arguments` prefix
bc8621d999 Fix: A lot of typos in code found by `typos`
b33beb7af5 Help: Fix some typos found by `sphinx-lint`
78e45c2db6 Style: Replace TABs with spaces for indentation in some files
74e0173f66 Tests(NuGet): Fix the test to ignore empty and space-only lines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10151
2025-01-14 09:44:34 -05:00
Brad King
c7c322be9a Merge topic 'find-cps-deps'
42de87cbae find_package: Find CPS dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10109
2025-01-14 09:41:14 -05:00
Brad King
8913b83d7f Merge topic 'FindPython-ARTIFACTS_PREFIX'
9b0510fa57 FindPython: add support for multiple searches in same directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10157
2025-01-13 11:46:50 -05:00
Brad King
66ba4fcae7 Merge topic 'ctest-cost-test-name-fix'
040da7d832 ctest: Allow arbitrary characters in test names of CTestCostData.txt

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10161
2025-01-13 11:45:17 -05:00
Brad King
74c462b4f8 Merge topic 'xcode-scheme-test-config'
7d28005244 Xcode: Support for test action 'Build Configuration' scheme property
1f4e1ccbc8 Help: Move launch config scheme property to the correct section
8aaae0f643 vim: Remove duplicated keywords from cmake.vim

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10154
2025-01-13 11:37:31 -05:00
Matthew Woehlke
42de87cbae find_package: Find CPS dependencies
Implement finding dependencies of CPS packages. This is done by setting
up additional `cmFindPackageCommand` instances which are used to look
for a parent package's dependencies.
2025-01-13 08:43:14 -05:00
Alex Turbov
bc8621d999 Fix: A lot of typos in code found by typos
Yet another great code spellchecker: https://github.com/crate-ci/typos/

(Will be added later as a `pre-commit` hook)
2025-01-12 18:49:34 +04:00
Alex Turbov
78e45c2db6 Style: Replace TABs with spaces for indentation in some files
Mark files that must use TABs to indent in the `.gitattributes`.
Use space instead of TABs in sources and some data/test files.
2025-01-12 18:49:25 +04:00
Marc Chevrier
9b0510fa57 FindPython: add support for multiple searches in same directory
In some situations, like cross-compilation, it can be required to search for
the host python interpreter as well as the cross-compilation development
artifacts.
By managing different prefixes for the artifacts, multiple and independent
searches can be achieved.
2025-01-11 15:47:06 +01:00
John Drouhard
040da7d832 ctest: Allow arbitrary characters in test names of CTestCostData.txt
This changes the way lines in CTestCostData.txt are parsed to allow for
spaces in the test name.

It does so by looking for space characters from the end; and once two
have been found, assumes everything from the beginning up to that
second-to-last-space is the test name.

Additionally, parsing the file should be much more efficient since there
is no string or vector heap allocation per line. The std::string used by
the parse function to convert the int and float should be within most
standard libraries' small string optimization.

Fixes: #26594
2025-01-10 13:05:29 -06:00
Brad King
92f6b92155 Merge topic 'duplicate-source-behavior'
3e15419bd4 target_sources: Restore toleration of duplicate CXX_MODULES sources
5cfb8ae790 Tests/CXXModules: add a test with duplicate sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10155
2025-01-10 09:28:16 -05:00
Brad King
02b7250712 Merge topic 'lfortran-generate-object-code'
daf6cc89ee LFortran: Remove hard-coded --generate-object-code flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10159
2025-01-10 09:26:58 -05:00
Brad King
675518ea81 Merge topic 'revert-genex-tco-subgraph'
a6b84a438f GenEx: Revert "Limit TARGET_PROPERTY transitive closure optimization"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10156
2025-01-10 09:21:04 -05:00
Brad King
8bd397dce6 Merge topic 'vs-solution-items-absolute'
6c187aae3b VS: Fix VS_SOLUTION_ITEMS for absolute paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10153
2025-01-10 09:18:49 -05:00
Brad King
1ebfd7ac81 Merge topic 'gcc-import-std'
2a0ca6a26d ci: add jobs to test GCC 15-to-be with `import std`
469175c2e6 Experimental: recycle the `import std` UUID
a980dab9b1 gcc: support `import std`
2791b7564b Tests/RunCMake: handle C++26 support where needed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10023
2025-01-10 09:04:38 -05:00
Brad King
c298905998 Merge topic 'find-cps-fix-defs'
8843407d52 cmPackageInfoReader: Improve warning messages
5fb1726761 cmPackageInfoReader: "Fix" handling of "includes"
c44c5b07be cmPackageInfoReader: Fix handling of "definitions"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10117
2025-01-10 08:59:43 -05:00
Ben Boeckel
3e15419bd4 target_sources: Restore toleration of duplicate CXX_MODULES sources
In commit 9c0491a3e4 (cmDyndepCollation: write out scanned source
information too, 2024-03-25) via !9708, the `sf_map` gained a new job of
also being used to track non-file set sources which could import
modules. This was implemented by removing processed `FILE_SET TYPE
CXX_MODULES` sources from the map and working with the sources
remaining. When a `FILE_SET TYPE CXX_MODULES` source appeared multiple
times, this would then erroneously complain that it "was not scheduled
for compilation". Use a set of source paths to track sources that have
already been processed. If duplicates are found, trigger an author
warning and skip the duplicate file.

Fixes: #26549
2025-01-09 22:36:06 +01:00
Ben Boeckel
5cfb8ae790 Tests/CXXModules: add a test with duplicate sources
See: #26549
2025-01-09 22:36:06 +01:00
Saurabh Kumar
daf6cc89ee LFortran: Remove hard-coded --generate-object-code flag
This was added in commit 98d0f918ba (LFortran: Add support for this
compiler, 2024-01-25, v3.31.0-rc1~303^2~2) because it is needed for
cases covered by CMake's Fortran tests.  However, it does not work
with Fortran modules and breaks lfortran's own `examples/project1`.
Move the flag to the test cases that need it, just as the original
commit did with `--implicit-interface`.

Fixes: #26597
Co-authored-by: Brad King <brad.king@kitware.com>
2025-01-09 14:49:39 -05:00
Brad King
a6b84a438f GenEx: Revert "Limit TARGET_PROPERTY transitive closure optimization"
Revert commit 4a11772618 (GenEx: Limit TARGET_PROPERTY transitive
closure optimization to subgraphs, 2024-05-31, v3.31.0-rc1~114^2).
The change caused substantial performance regressions in some
existing use cases.  Revert it pending further investigation.

Issue: #25728
Fixes: #26457
2025-01-09 11:56:20 -05:00
Cristiano Carvalheiro
7d28005244 Xcode: Support for test action 'Build Configuration' scheme property
Also allow scoped property checking on Xcode scheme tests to
 be able to distinguish between launch and test actions build config.
2025-01-09 16:36:33 +00:00
Lauri Vasama
6c187aae3b VS: Fix VS_SOLUTION_ITEMS for absolute paths
This was missed in commit 0bb13ba0e6 (VS: Add support for Visual Studio
solution items, 2024-10-27).

Fixes: #26593
2025-01-09 11:29:32 -05:00
Brad King
52b31ff751 Merge topic 'multi-format-export'
c8997fc046 export: Allow depending on targets exported multiple times
7b553a3b1d cmExportInstallFileGenerator: Report errors with IssueMessage
6195cefcfe export: Convert ExportInfo to a struct with meaningful field names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10114
2025-01-09 10:57:43 -05:00
Matthew Woehlke
5fb1726761 cmPackageInfoReader: "Fix" handling of "includes"
Rewrite how cmPackageInfoReader parses "includes" to also support
language-specific includes (i.e. map-of-string-to-list-of-string).
Previously, we only supported the simpler list-of-string shorthand for
"includes" that do not have any language-specific includes.
2025-01-09 10:23:01 -05:00
Matthew Woehlke
c44c5b07be cmPackageInfoReader: Fix handling of "definitions"
Rewrite cmPackageInfoReader's parsing of the "definitions" attribute.
The old logic (having been originally adapted from proof-of-concept
parsing code circa 2023) was parsing the attribute according to its
specification as of CPS 0.11, but the representation was changed in
CPS 0.12. Add a test to verify that definitions are being imported
correctly. Remove unnecessary setting and resetting of CMAKE_PREFIX_PATH
in the test.
2025-01-09 10:22:52 -05:00
Ben Boeckel
469175c2e6 Experimental: recycle the import std UUID
Now that GCC is supported, update the feature UUID.
2025-01-08 16:32:14 -05:00
Ben Boeckel
a980dab9b1 gcc: support import std 2025-01-08 16:32:14 -05:00
Ben Boeckel
2791b7564b Tests/RunCMake: handle C++26 support where needed 2025-01-08 16:32:14 -05:00
Bart van Deenen
5bbbdf36f4 Tests/RunCMake/RuntimePath: Fix Stub case for musl C library
Fixes: #26565
2025-01-08 12:04:18 -05:00
Martin Duffy
c8997fc046 export: Allow depending on targets exported multiple times
Fixes: #26556
2025-01-07 15:27:14 -05:00
Alex Turbov
74e0173f66 Tests(NuGet): Fix the test to ignore empty and space-only lines 2025-01-06 04:16:32 +04:00
Martin Duffy
7b553a3b1d cmExportInstallFileGenerator: Report errors with IssueMessage 2024-12-30 10:59:44 -05:00
Brad King
0a05e1d039 Merge topic 'find_package-empty-roots'
adfb0623cb find_package: Fix assertion failure on empty sysroots
1c6cecdce9 cmFindPackageCommand: Fix searching a root path as a prefix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10113
2024-12-20 09:20:14 -05:00
Brad King
79e41d3cc6 Merge topic 'rpath-preserve-setuid-setgid'
0907a322f3 install: Restore SETUID/SETGID after RPATH change

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10053
2024-12-20 09:18:24 -05:00
Brad King
adfb0623cb find_package: Fix assertion failure on empty sysroots
Previously we crashed if at least one root variable was set to empty and
at least one to non-empty.

Fixes: #26538
2024-12-19 09:58:02 -05:00
Volodymyr Zolotopupov
0907a322f3 install: Restore SETUID/SETGID after RPATH change
Most Unix-like systems drops the SETUID/SETGID bits when a file changes,
so after changing the RPATH, it is necessary to restore
the original file mode.
2024-12-19 08:29:44 -05:00
Martin Duffy
8a3c195188 Tests/RunCMake: Add RunCMake_CHECK_ONLY Option
Allows run_cmake test cases that run a verification script and no other command
2024-12-18 10:52:33 -05:00
Brad King
5c7bb0bfd9 Merge topic 'rename-cmakelists'
fcbc883fa3 cmake: Allow configuration of default script names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !10059
2024-12-18 08:49:58 -05:00