Commit Graph

36115 Commits

Author SHA1 Message Date
Kitware Robot 9673f61be1 CMake Nightly Date Stamp 2024-09-02 00:03:08 -04:00
Kitware Robot ae6bd4d5b6 CMake Nightly Date Stamp 2024-09-01 00:02:03 -04:00
Kitware Robot 0d0ae4b577 CMake Nightly Date Stamp 2024-08-31 00:01:30 -04:00
Kitware Robot 7537fec125 CMake Nightly Date Stamp 2024-08-30 00:01:17 -04:00
Brad King e25f95c4cc Merge topic 'standard-link-directories'
20e9b59d5e Linking: Add CMAKE_LANG_STANDARD_LINK_DIRECTORIES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9707
2024-08-29 08:31:17 -04:00
Brad King a2c9e59436 Merge topic 'remove-vs12-generator'
241f923a6f Drop Visual Studio 12 2013 generator
7c1b671c3a Tests: Disable VSXaml test pending update to newer VS versions
9042aa1af5 Tests: Remove WinCE tests
810e33f67a Tests: Simplify tests for Visual Studio generators
1ad39a9cf8 UseSWIG: Simplify test for Visual Studio generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9782
2024-08-29 08:29:14 -04:00
Brad King a69f063062 Merge topic 'project_ensure_non_cache_variables'
c1ece78d11 project: non cache <project> prefix variables are also created

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9779
2024-08-29 08:26:42 -04:00
Kitware Robot c43b116fcf CMake Nightly Date Stamp 2024-08-29 00:01:12 -04:00
Vito Gamberini 20e9b59d5e Linking: Add CMAKE_LANG_STANDARD_LINK_DIRECTORIES
Closes: #18222
2024-08-28 15:54:43 -04:00
Brad King 241f923a6f Drop Visual Studio 12 2013 generator
This generator has been deprecated since CMake 3.28.  Remove it.
2024-08-28 14:13:05 -04:00
Brad King 1d6535c881 Merge topic 'nullptr-comp'
58da4aa47d Source: Avoid comparing pointers to nullptr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9778
2024-08-28 10:08:11 -04:00
Brad King 7630fc9d2b Merge topic 'JSONHelpers-FilteredObject'
0c17cc9ef5 cmJSONHelpers.h: Add `FilteredObject` helper

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9751
2024-08-28 10:07:00 -04:00
Kitware Robot 9b421a5fa3 CMake Nightly Date Stamp 2024-08-28 00:01:56 -04:00
Ben Boeckel 84bc710d84 cmGlobalGenerator: generate build database files for targets 2024-08-27 12:37:36 -04:00
Ben Boeckel 670f753f24 cmDyndepCollation: write build database metadata
Generators will hook this up into the build graph as needed.
2024-08-27 12:37:36 -04:00
Ben Boeckel dcf9a66ffe cxxmodules: plumb control data for exporting build databases
This includes the target property, its initializing variable, its
initializing environment variable, and updating related docs to mention
the new bits.
2024-08-27 12:37:36 -04:00
Ben Boeckel bea4fb7cd6 cmDyndepCollation: update template module database files if requested 2024-08-27 12:37:35 -04:00
Ben Boeckel 9c0491a3e4 cmDyndepCollation: write out scanned source information too
This is required to fill in the `requires` field for sources using
modules that do not provide them.
2024-08-27 12:37:35 -04:00
Ben Boeckel 48faa19c19 cmBuildDatabase: support writing template files 2024-08-27 12:37:34 -04:00
Ben Boeckel cedfaa010f cmGeneratorTarget: add a method to build classified command lines
This is essentially an extraction of the `Ninja` generator's command
line building logic. Porting generators to reuse this construction is a
task for the future.
2024-08-27 12:37:21 -04:00
Ben Boeckel c96ea5684d cmcmd: add a tool to manage module compilation databases
Includes verification and merging subcommands to start with.
2024-08-27 12:37:13 -04:00
Robert Maynard c1ece78d11 project: non cache <project> prefix variables are also created
Fixes #26243, #25714
2024-08-27 12:37:07 -04:00
Ben Boeckel 4df5a6fbb4 cmBuildDatabase: add initial structures
This class represents a build database as introduced by P2977R0. It
includes support for reading, writing, and merging.

See: http://wg21.link/p2977r0
2024-08-27 12:36:46 -04:00
Ben Boeckel 7b8b751637 cmGlobalGenerator: add a method to make an output-formatted string
This is needed to inject arguments through flag generation mechanisms so
that they can all be unescaped uniformly. Eventually, these methods
should go away and the escape/unescape dance be avoided completely.
2024-08-27 11:30:23 -04:00
Ben Boeckel c48affe037 cmMakefile: support "after generator target" generator actions
These actions may require additional information gathered during
generation. Run them at the appropriate time.
2024-08-27 11:30:23 -04:00
Ben Boeckel c66821b22b cmGeneratorTarget: add the concept of a "family" name
With synthetic targets, a name which is the same between all synthetic
targets which share a base target is warranted.
2024-08-27 11:30:23 -04:00
Ben Boeckel 5b89e46c11 cmCommandLineArgument: add missing header to source list 2024-08-27 11:30:23 -04:00
Vitaly Stakhovsky 58da4aa47d Source: Avoid comparing pointers to nullptr 2024-08-27 10:56:38 -04:00
Brad King 72607d3402 Merge topic 'cps-export'
b2dc1bd149 CMake: Suppress IBM XL optimization warning
1a846c8849 Tests: Add tests for install(PACKAGE_INFO)
3d52d70b84 export: Add initial CPS support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9693
2024-08-27 09:43:51 -04:00
Kitware Robot cc02ac8314 CMake Nightly Date Stamp 2024-08-27 00:01:23 -04:00
Alex Turbov 0c17cc9ef5 cmJSONHelpers.h: Add FilteredObject helper
Iterate over the object's members and call a filter callable to decide what
to do with the current key/value. A filter returns one of the `FilterResult`
values. A container type is an associative or a sequence container of pairs
(key, value).

Refactor `MapFilter()` and `Map()` to use `FilteredObject()`. Moreover,
for C++ >= 17 implementation is more optimized depending on the given filter
object type and capable of detecting and properly calling the filter callable
using 1 or 3 arguments, up to totally eliminate any checking (even dummy)
in the generated code.

Supported container types, used to append key/value items, aren't limited to
`std::map` only and can be any associative container or a sequenced one with
pairs of key/value as elements.
2024-08-26 19:01:48 +04:00
Brad King cd4210eb6d Merge topic 'cmake_path-GET-STEM'
b0be1bd9ca cmake_path: Fix 'GET "foo/.." STEM' result

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9765
2024-08-26 10:00:15 -04:00
FeRD (Frank Dana) b0be1bd9ca cmake_path: Fix 'GET "foo/.." STEM' result
`cmake_path(GET "foo/.." STEM out)` is supposed to set `out` to `".."`,
the entire `cmake_path(GET "foo/.." FILENAME)` result.

However, the `GetNarrowStem()` logic in `cmCMakePath` was lacking
the `.` and `..` special-casing logic present in other methods.
As a result, it would erroneously trim the second `.` off of a stem
of `..` and return only `.`.

This caused the result of `cmake_path(GET "foo/.." STEM)` to be `"."`.

Making the standard empty-or-.-or-.. checks and bailing out early
fixes the result of `cmCMakePaths{".."}.GetNarrowStem()`.

Fixes: #26235
2024-08-26 09:55:57 -04:00
Brad King d625e832ed Merge topic 'cmake-parse-arguments-one-arg-empty-string'
ceeea4e511 cmake_parse_arguments: Set variable if empty string given after keyword
2f5cc6afa1 cmParseArgumentsCommand: Use cmStrCat() for string concatenation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9748
2024-08-26 09:53:16 -04:00
Brad King fe63f15383 Merge topic 'fileapi-config-dir'
1df94443fe fileapi: Add support for user-wide queries
a991a5019b Tests: Isolate test suite from user-wide configuration
320b81847d Tests: Remove unused cvs anonymous access credentials

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9744
2024-08-26 09:48:40 -04:00
Kitware Robot 70470acb84 CMake Nightly Date Stamp 2024-08-26 00:03:54 -04:00
Kitware Robot cfdc318c93 CMake Nightly Date Stamp 2024-08-25 00:01:11 -04:00
Kitware Robot 86f2af6173 CMake Nightly Date Stamp 2024-08-24 00:01:55 -04:00
Kitware Robot 5022113bbe CMake Nightly Date Stamp 2024-08-23 00:01:22 -04:00
Craig Scott ceeea4e511 cmake_parse_arguments: Set variable if empty string given after keyword
If a single-value keyword is followed by an empty string, the
command unsets the variable for that keyword instead of setting
it to the empty string. This is inconsistent and unexpected. Add
policy CMP0174 which ensures the variable for a single-value
keyword is always set when any value is given, not just for a
non-empty value.

The new CMP0174 policy only affects the PARSE_ARGV form of
cmake_parse_arguments. The older form silently drops all empty
string arguments before processing the argument list.

Fixes: #25972
2024-08-23 09:42:13 +10:00
Craig Scott 2f5cc6afa1 cmParseArgumentsCommand: Use cmStrCat() for string concatenation 2024-08-23 09:42:12 +10:00
Martin Duffy 1df94443fe fileapi: Add support for user-wide queries
Fixes: #19168
2024-08-22 10:24:23 -04:00
Brad King 3d61720112 Merge topic 'autogen-predefs-emscripten'
8d1803d463 AutoGen: Run batch scripts using cmd.exe on windows platforms explicitly
9ab270f47d cmSystemTools: Add GetComspec method to get cmd on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9733
2024-08-22 09:03:05 -04:00
Kitware Robot 497b43b997 CMake Nightly Date Stamp 2024-08-22 00:01:17 -04:00
Brad King d81a2e4f5e Merge topic 'cpack-pkg-c_str'
1393b31635 cmCPackPKGGenerator: Remove redundant call to c_str

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9759
2024-08-21 08:54:14 -04:00
Alexey Edelev 8d1803d463 AutoGen: Run batch scripts using cmd.exe on windows platforms explicitly
The CreateProcessW function requires to use the cmd.exe when
attempting to execute batch scripts. AutoMoc RunProcess relies on
CreateProcessW in it's internals. Currently the cmd.exe run happens
implicitly for batch files(perhaps by luck), but this is not
documented anywhere.

This replaces the .bat files in the AutoGen related command lines with
explicit 'cmd.exe /c' call. Also 'cmd.exe /c' has own limitation
related to the arguments. The very first argument shouldn't be quoted
otherwise this lead to the parsing issues. So for the .bat files that
contain spaces in their paths use short name conversion.

Fixes #26208
2024-08-21 11:05:19 +02:00
Alexey Edelev 9ab270f47d cmSystemTools: Add GetComspec method to get cmd on Windows
The function attempts to read the path to cmd executable from the
COMSPEC environment variable. Falls back to cmd.exe if the respective
environment variable is not set or path doesn't exist.
2024-08-21 11:05:16 +02:00
Kitware Robot f1bf0d6a49 CMake Nightly Date Stamp 2024-08-21 00:01:38 -04:00
Rose 1393b31635 cmCPackPKGGenerator: Remove redundant call to c_str
The call is unnecessary since commit 438809d3ba (cmCPackGenerator: Add
option to FindTemplate to use alternate builtin path, 2024-03-06,
v3.30.0-rc1~353^2~4).
2024-08-20 11:58:28 -04:00
Brad King 041a482079 Merge topic 'vector-reserve-and-emplace'
abc8410ac7 cmInstallScriptHandler: Reserve and emplace vector entries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9753
2024-08-20 11:53:49 -04:00