Commit Graph

36470 Commits

Author SHA1 Message Date
Marc Chevrier 656267c871 COMPILE_WARNING_AS_ERROR: rename methods to prepare link similar functionality
Methods renamed:
* SetIgnoreWasinigAsError => SetIgnoreCompileWasningAsError
* GetIgnoreWasinigAsError => GetIgnoreCompileWasningAsError
2024-11-12 14:52:28 +01:00
Kitware Robot 3c9b8b4a7c CMake Nightly Date Stamp 2024-11-12 00:01:46 -05:00
Brad King 87cb3036e5 Merge topic 'file-LOCK-windows'
8e810f8a7e cmFileLock: Fix implementation on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9976
2024-11-11 09:39:45 -05:00
Kitware Robot 0c93e086b7 CMake Nightly Date Stamp 2024-11-11 00:03:01 -05:00
Kitware Robot 34ebc4bc14 CMake Nightly Date Stamp 2024-11-10 00:01:20 -05:00
Kitware Robot 23e24788ab CMake Nightly Date Stamp 2024-11-09 00:01:15 -05:00
Alexander Neumann 8e810f8a7e cmFileLock: Fix implementation on Windows
Fixes: #26428
2024-11-08 12:52:13 -05:00
Brad King ed7910b642 Merge topic 'refactor-documentation-formatter'
dd0142e6d0 cmDocumentationFormatter: Refactor the `PrintFormatted()` method
ef88ec41f3 testDocumentationFormatter: Add some more test cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9979
2024-11-08 11:54:19 -05:00
Kitware Robot faf6954efa CMake Nightly Date Stamp 2024-11-08 00:01:49 -05:00
Alex Turbov dd0142e6d0 cmDocumentationFormatter: Refactor the PrintFormatted() method
- Introduce the `std::string Format(std:string)` method
- Simplify the algorithm to use `cmTokenizedView()` instead of pointers manipulation and slow iostreams
- Formatted text chunks are collected as a sequence of string views to join once at the end
2024-11-07 20:46:37 +04:00
Brad King 8353e6ab8d Merge topic 'vs-custom-command-disable-parallel-build'
4ee8705b12 VS: add source property VS_CUSTOM_COMMAND_DISABLE_PARALLEL_BUILD

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9958
2024-11-07 10:07:03 -05:00
Brad King 3a51367548 Merge topic 'refactor-cmTokenize'
f3f70c2f90 StringAlgorithms: Refactor `cmTokenize()` function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9944
2024-11-07 10:06:04 -05:00
Brad King 15d9db0af3 Merge topic 'update-kwsys'
d269f82015 Merge branch 'upstream-KWSys' into update-kwsys
9b1a873de8 KWSys 2024-11-06 (81583094)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9975
2024-11-07 10:04:44 -05:00
Brad King d3edfba804 Merge topic 'ninja-regenerate-scripts'
f50fb77a4f Ninja: Regenerate when test or install scripts are missing
79349dee01 cmake: Always update timestamps on test and install scripts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9923
2024-11-07 10:03:32 -05:00
Brad King c417507523 Merge topic 'ctest-remove-handlers'
2b052ad5ca cmCTestUploadCommand: Remove handler usage
db3ccdce41 cmCTestUploadHandler: Move class into cmCTestUploadCommand.cxx
1b8f9274b2 cmCommand: Remove
8768a0c6e1 cmCTest*Command: Port away from cmCommand
c98ed10d0f cmCTest*Command: Declare member functions const
0e995d4897 cmCTest*Command: Direct use of cmExecutionStatus
26a697f7c1 cmCTest*Command: Access Makefile through an alias
caa449493b cmCTest*Command: Fortify argument parsing
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9968
2024-11-07 10:02:05 -05:00
Kitware Robot 524aa61c59 CMake Nightly Date Stamp 2024-11-07 00:01:55 -05:00
Darragh Coy 4ee8705b12 VS: add source property VS_CUSTOM_COMMAND_DISABLE_PARALLEL_BUILD
This boolean setting allows parallel building to be disabled for
individual source files built via `add_custom_command`. Using this
option is equivalent to setting policy `CMP0147` to the `OLD` behavior.

Closes: #26413
2024-11-06 13:29:57 -05:00
Alex Turbov f3f70c2f90 StringAlgorithms: Refactor cmTokenize() function
- Refactor and optimize the loop to make it shorter and faster
- Make it push elements into an arbitrary (templated) output iterator
- Make it a template on a separator type with the most used defaults
- Add a backward compatible signature to return `std::vector<std::string>`
- Add an alternative function `cmTokenizedView()` to return a vector of string views
2024-11-06 18:42:17 +04:00
Brad King d269f82015 Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2024-11-06 (81583094)
2024-11-06 09:24:07 -05:00
Martin Duffy f50fb77a4f Ninja: Regenerate when test or install scripts are missing
Rerun CMake when `cmake_install.cmake` or `CTestTestfile.cmake` are out
of date.  This enables regeneration if a subdirectory is removed before
invoking `ninja`.

Fixes: #26396
2024-11-06 08:35:57 -05:00
Martin Duffy 79349dee01 cmake: Always update timestamps on test and install scripts
Since commit d46d8df0ed (ENH: Re-implemented cmGeneratedFileStream to
... replace the destination file atomically, 2004-11-03, v2.4.0~2578) we
have generated `cmake_install.cmake` scripts with "copy-if-different"
semantics such that their timestamp is only updated when their contents
change.  In commit d395b563ed (ENH: ... test files are written by local
generator, 2005-04-24, v2.4.0~1842) we copied the approach for
generating `CTestTestfile.cmake` scripts.

In both cases, preserving timestamps is not needed and was only a side
effect of using `cmGeneratedFileStream` to replace the generated files
atomically.  Drop the "copy-if-different" semantics and always update
their timestamps so it is possible to know when they have been
regenerated.
2024-11-06 08:35:57 -05:00
Kitware Robot a99af46c3d CMake Nightly Date Stamp 2024-11-06 00:01:34 -05:00
Brad King cf0b482d8d Merge topic 'realpath-windows'
16af27fd42 cmSystemTools: Drop GetRealPathResolvingWindowsSubst
823e1df54c cmSystemTools: Implement GetRealPath on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9973
2024-11-05 09:10:02 -05:00
Brad King 85d0e377f7 Merge topic 'LINKER-prefix-generalization'
61aee8c7bd Add support of "LINKER:" prefix for Windows executable creation
8bcf9c7a3e Add support of "LINKER:" prefix for artifact creation flags
2bd4c06c26 Refactoring cmRulePlaceHolderExpander: propagate cmBuildStep information
35350c419d Add support of "LINKER:" prefix for CMAKE_<TYPE>_LINKER_FLAGS variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9922
2024-11-05 09:08:44 -05:00
Brad King bc09ea1eb5 Merge topic 'getopt-ifset'
17ee28728b cmCPackGenerator: Add GetOptionIfSet() to avoid duplicate calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9972
2024-11-05 09:04:37 -05:00
Daniel Pfeifer 2b052ad5ca cmCTestUploadCommand: Remove handler usage 2024-11-05 10:20:12 +01:00
Daniel Pfeifer db3ccdce41 cmCTestUploadHandler: Move class into cmCTestUploadCommand.cxx
Place declaration and definitions into places where following
refactoring will cause minimal deltas.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer 1b8f9274b2 cmCommand: Remove
Finally. All commands are immutable.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer 8768a0c6e1 cmCTest*Command: Port away from cmCommand
Copy the necessary parts, but remove cloning and make all commands
immutable.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer c98ed10d0f cmCTest*Command: Declare member functions const 2024-11-05 10:20:12 +01:00
Daniel Pfeifer 0e995d4897 cmCTest*Command: Direct use of cmExecutionStatus
Make sure that getting Makefile and setting Error is both done
through a `status` argument rather than through `cmCommand`.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer 26a697f7c1 cmCTest*Command: Access Makefile through an alias
At the top of each function that requires access to Makefile,
declare an alias `mf = this->Makefile`.  Then replace all occurrences
of `this->Makefile->` with `mf.`.  The intention is to make following
changes easier to review.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer caa449493b cmCTest*Command: Fortify argument parsing
Fix tests that pass `CDASH_UPLOAD` or `SCHEDULE_RANDOM` without an argument.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer ff2ec0387a cmCTest*Command: Generalize argument parsing and checking
Move the instantiation of unparsed arguments as well as the `parser.Parse` call
behind an abstraction.  Merge checks on `captureCMakeError`.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer 4ffc408ed9 cmCTest*Command: Loosen coupling with cmArgumentParser
Instead of inheriting from `cmArgumentParser<void>` and binding arguments by
overriding `BindArguments`, define a struct for the arguments and instantiate
a static const parser in the `InitialPass` function of each command.  Pass the
argument struct down to all functions that need to access it.
2024-11-05 10:08:23 +01:00
Daniel Pfeifer 1a2d453b94 cmCTest*Command: Access arguments through an alias
At the top of each function that requires access to arguments,
declare an alias `args = *this`.  Then access all arguments with
`args.` rather than `this->`.  The intention is to make following
changes easier to review.
2024-11-05 10:08:23 +01:00
Daniel Pfeifer c1de0976f8 cmCTest*Command: Bring all classes to a uniform layout
Make sure that all classes have a public inherited constructor, protected
data members for the arguments, followed by other private virtual functions.
The intention is to make following changes to have a smaller diff.
2024-11-05 10:08:23 +01:00
Daniel Pfeifer 73830f976a cmCTestBuildCommand: Remove GlobalGenerator member
The command object is cloned before each invocation.
The situation where the pointer is not null never occurs.
2024-11-05 10:08:23 +01:00
Kitware Robot d094dfa0c6 CMake Nightly Date Stamp 2024-11-05 00:01:37 -05:00
Vitaly Stakhovsky 17ee28728b cmCPackGenerator: Add GetOptionIfSet() to avoid duplicate calls 2024-11-04 12:59:15 -05:00
Brad King 16af27fd42 cmSystemTools: Drop GetRealPathResolvingWindowsSubst
It was created by commit 83630d4918 (cmSystemTools: Revert GetRealPath
implementation on Windows, 2018-05-29, v3.11.3~3^2) to preserve support
on Windows for one call site.  Now that `GetRealPath` works again on
Windows, we can use that instead.

Issue: #18033
2024-11-04 12:03:56 -05:00
Brad King 823e1df54c cmSystemTools: Implement GetRealPath on Windows
Use `cm::PathResolver`'s `RealPath` variant to normalize paths,
look up their on-disk case, and resolve symlinks, but without
resolving `subst` drives on Windows.

Fixes: #17206
2024-11-04 11:56:14 -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
Marc Chevrier 8bcf9c7a3e Add support of "LINKER:" prefix for artifact creation flags
The following variables now support the LINKER: prefix:
    * CMAKE_SHARED_LIBRARY_CREATE_<LANG>_FLAGS
    * CMAKE_SHARED_MODULE_CREATE_<LANG>_FLAGS
    * CMAKE_<LANG>_LINK_FLAGS
2024-11-04 17:08:03 +01:00
Marc Chevrier 2bd4c06c26 Refactoring cmRulePlaceHolderExpander: propagate cmBuildStep information 2024-11-04 17:08:02 +01:00
Marc Chevrier 35350c419d Add support of "LINKER:" prefix for CMAKE_<TYPE>_LINKER_FLAGS variable
The following variables now support the LINKER: prefix:
* CMAKE_<TYPE>_LINKER_FLAGS
* CMAKE_<TYPE>_LINKER_FLAGS_<CONFIG>

Fixes: #26171
2024-11-04 17:07:58 +01:00
Brad King 384dbef61e Merge topic 'normalize-input-paths'
799602b983 cmQtAutoMocUic: Remove now-unnecessary mutex around CollapseFullPath
5ca6234d13 KWSys: Remove path translation map settings for build within CMake
74c497ca65 Merge branch 'upstream-KWSys' into normalize-input-paths
10a381e446 KWSys 2024-11-04 (bef1f021)
73dddffe32 KWSys: Disable the path translation map for build within CMake
b378781c5d cmSystemTools: Cache ToNormalizedPathOnDisk actual-case lookups
622596c6b2 cmSystemTools: Re-implement ToNormalizedPathOnDisk without translation map
5aed3ee49d cmSystemTools: Add GetLogicalWorkingDirectory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9969
2024-11-04 10:09:16 -05:00
Brad King 799602b983 cmQtAutoMocUic: Remove now-unnecessary mutex around CollapseFullPath
KWSys's `CollapseFullPath` no longer maintains global state. The mutual
exclusion added by commit 51676cf655 (Autogen: Split JobEvalCacheT job
into separate moc and uic jobs, 2019-09-12, v3.16.0-rc1~94^2~7) and
commit 53d523f2e1 (autogen: fix race in depfile parsing, 2021-04-15,
v3.20.2~10^2) is no longer needed.
2024-11-04 10:00:17 -05:00
Brad King 74c497ca65 Merge branch 'upstream-KWSys' into normalize-input-paths
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2024-11-04 (bef1f021)
2024-11-04 09:59:56 -05:00
Brad King f21c08ebbf Merge topic 'ctest-crash-handling'
0a4ee422c1 ctest: Restore Windows Error Reporting in interactive mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9855
2024-11-04 09:52:51 -05:00