| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
8f68bcad8f Tests: Add cases verifying flag ordering rules
ccc83ce162 Help: Document order of flags from CMAKE_<LANG>_FLAGS and COMPILE_OPTIONS
df79fe055b Help: Remove incorrect "versionadded" for CMAKE_<LANG>_FLAGS_<CONFIG>
c48d2d8480 VS: Place per-source preprocessor definitions after target-wide ones
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6187
|
| | |
|
| |
| |
| |
| | |
Fixes: #22180
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
6c34ed9b87 cmake: Allow CMAKE_TOOLCHAIN_FILE to be set by environment variable
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6188
|
| |/
| |
| |
| |
| | |
When no `CMAKE_TOOLCHAIN_FILE` is explicitly specified while creating
a new build tree, check for an environment variable of the same name.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1d7fddca8e CMakeParseImplicitLinkInfo: Honor GNU static runtime library flags
629eb3926b Tests: Extend ParseImplicit*Info with static GNU runtime library flags
9d0f8c3e56 Tests: Teach RunCMake.ParseImplicitLinkInfo to match output by regex
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6185
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With flags like `-static-libstdc++` or `-static-libgfortran`, the GNU
compiler driver adds `-Bstatic ... -Bdynamic` around its language
runtime library. Convert the libraries in between these to absolute
paths so that mixed-language linking honors the static runtime
libraries.
|
| | |
| | |
| | |
| | |
| | | |
Generate sample input data with GNU 10.2.1 compilers using flags like
`-static-libstdc++` and `-static-libgfortran`.
|
| |/
| |
| |
| |
| | |
As in commit 6bc6fc2a7f (Tests: Teach RunCMake.ParseImplicitIncludeInfo
to match output by regex, 2019-04-08, v3.14.2~5^2~1).
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| | |
87b71eec62 find_*: Add support for option NO_CACHE
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6181
|
| |
| |
| |
| |
| |
| |
| |
| | |
Request that find result is stored in a normal variable rather than a
cache entry.
Fixes: #20687
Issue: #20743
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
5d5610b04f CTest: Exit coverage handling early if no binary dir
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6144
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Check for the existence of the Binary directory string before checking
for coverage files. If the directory is not specified, write an error
message and do not do any checking.
Fixes: #22102
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In commit b2c14bc774 (cmake -E: Add cmake_transform_depfile internal
command, 2020-10-02, v3.20.0-rc1~684^2~2) a partial implementation for
converting MSBuild "TLog" format files was added. However, it is
unused and incomplete:
* Does not enforce absolute paths as TLog docs require.
* Does not upper-case paths as TLog docs recommend.
* The TLog format semantics are not equivalent to `out: in`.
Remove the unused TLog transform infrastructure to avoid confusion.
Issue: #20286
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
1cb4f592a0 add_custom_command: Target-dependent generator expression support
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6176
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
OUTPUT variant with a TARGET given to allow resolving target-based generator
expressions wouldn't work because OUTPUT is resolved before generator targets
are created, i.e. FindGeneratorTargetToUse() returns nullptr.
This is a known limitation, see #21364.
Implements #21336.
|
|\ \ \
| |_|/
|/| |
| | |
| | |
| | |
| | | |
a12639e658 file(GET_RUNTIME_DEPENDENCIES): Add POST_{IN,EX}CLUDE_FILES arguments
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6170
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
f7ba3a0589 FileAPI: Populate information for IMPORTED_RUNTIME_ARTIFACTS
df7040a271 install(): Add IMPORTED_RUNTIME_ARTIFACTS mode
60e752ced8 Refactor: Move common methods into cmInstallGenerator
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6162
|
| | | | |
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
3941555d93 target_link_libraries: Place $<TARGET_OBJECTS> before libraries
f530b3a267 OpenWatcom: Add infrastructure to link to object files
8a4ca110e4 cmComputeLinkInformation: Improve type safety of item IsPath member
83ad066ed1 cmComputeTargetDepends: Factor out helper to add object library dependency
7f506b95a7 cmGeneratorTarget: Refactor link item lookup
96809a8541 cmGeneratorTarget: Give temporary link impl item an explicit name
ddffbb8adb cmMakefile: Register explicit object sources more efficiently
18e42d3e63 cmGeneratorExpressionNode: Constify local variable
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6166
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Linkers always use object files explicitly specified on the command line
regardless of where they appear. Move them to the front of the list of
linked libraries in so that symbols required by the object files can be
resolved by any library.
Issue: #22149
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
ae108418ae Launchers: Support setting linker launchers
92c8b83641 cmNinjaNormalTargetGenerator: Fix "Language" rule variable
d93bfd95f8 Tests/CompilerLauncher: Fix file names and clarify comment
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6092
|
| | | |
| | | |
| | | |
| | | | |
Fixes: #18316
|
| |/ / |
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | | |
316cbbe8d5 Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6173
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Extend the fix from commit 67e2130c96 (Makefiles: Fix
CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule,
2020-11-20, v3.19.1~8^2) to work for the `<FLAGS>` placeholder too.
Also fix the test case to actually enable `EXPORT_COMPILE_COMMANDS`
on the test target.
Fixes: #22261
|
|\ \ \
| |_|/
|/| |
| | |
| | |
| | |
| | | |
e609afeb5f WriteBasicConfigVersion supports version strings such as 21.07.04
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6167
|
| | |
| | |
| | |
| | | |
Fixes #22207
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
2ae72ef74b Xcode: Enable multi-arch TARGET_OBJECTS genex in [INTERFACE_]LINK_LIBRARIES
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6161
|
| |/ /
| | |
| | |
| | | |
This was an oversight in the original implementation.
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | | |
26e36111d3 CPack: Implement new variable CPACK_CUSTOM_INSTALL_VARIABLES
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6141
|
| | |
| | |
| | |
| | |
| | |
| | | |
The new variable allows projects to define custom key=value pairs of
variables to be set in CPack cmake_install.cmake script invocations.
This allows install(SCRIPT|CODE) to be parameterized at runtime.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The Ninja generator traditionally referenced source files and include
directories using paths relative to the build directory if they could be
expressed without a `../` sequence that leaves the build and source
directories. For example, when using a `build/` directory inside the
source tree, sources would be compiled as `-c ../src.c` and include
directories would be referenced as `-I ../include`. This approach
matches the traditional Ninja convention of using relative paths
whenever possible, but has undesirable side effects such as:
* Compiler diagnostic messages may not use absolute paths, making it
harder for IDEs/editors to find the referenced sources or headers.
* Debug symbols may not use absolute paths, making it harder for
debuggers to find the referenced sources or headers.
* Different results depending on the path to the build tree relative
to the source tree.
* Inconsistent with the Makefile generators, which use absolute paths.
Switch to always using absolute paths to reference source files and
include directories on compiler command lines. While alternative
solutions for diagnostic messages and debug symbols may exist with
specific tooling, this is the simplest and most consistent approach.
Note that a previous attempt to do this in commit 955c2a630a (Ninja: Use
full path for all source files, 2016-08-05, v3.7.0-rc1~275^2) was
reverted by commit 666ad1df2d (Revert "Ninja: Use full path for all
source files", 2017-02-24, v3.8.0-rc2~9^2) due to problems hooking up
depfile dependencies on generated files. This time, the changes in
commit 2725ecff38 (Ninja: Handle depfiles with absolute paths to
generated files, 2021-05-19) should avoid those problems.
Fixes: #13894, #17450
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
668ba68a7a FindVulkan: add Vulkan::Headers and Vulkan::glslangValidator targets
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6154
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The `Vulkan::Headers` target complements existing Vulkan::Vulkan target.
It is the same except it omits the Vulkan library which supports
applications that loads the Vulkan library in at runtime.
The `Vulkan::glslangValidator` target provides the glslangValidator
executable which is the tool for converting between shader languages
(GLSL, SPIR-V, etc.).
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
d96eb55282 set(CACHE): do not remove normal variable
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6146
|
| | | | |
| | | | |
| | | | |
| | | | | |
Fixes: #22038
|
|\ \ \ \ \
| | |/ / /
| |/| | /
| |_|_|/
|/| | | |
|
| | |/
| |/| |
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
2725ecff38 Ninja: Handle depfiles with absolute paths to generated files
bc40cd7a4e Tests: Add case covering a unity build with a generated source
ae927f936d cmGlobalNinjaGenerator: Improve allocation pattern in WriteBuild
68e5f92cad cmGlobalNinjaGenerator: Factor out custom command output collection
c5195193d3 cmGlobalNinjaGenerator: Reduce string copies in WriteCustomCommandBuild
8bac527b0c cmGlobalNinjaGenerator: Re-order logic in WriteCustomCommandBuild
ddc030f5ca cmGlobalNinjaGenerator: Record implicit outputs as known too
ceb82752ef cmLocalNinjaGenerator: Use variable for main custom command output path
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6143
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Ninja treats every (normalized) path as its own node. It does not
recognize `/abs/path/to/file` in a depfile as matching `path/to/file`
even when `build.ninja` and the working directory are in `/abs/`.
See Ninja Issue 1251. In cases where we pass absolute paths to the
compiler, it will write a depfile containing absolute paths. If those
files are generated in the build tree by custom commands, `build.ninja`
references them by relative path in build statement outputs, so Ninja
does not hook up the dependency and rebuild the project correctly.
Add infrastructure to work around this problem by adding implicit
outputs to custom command build statements that reference the main
outputs by absolute path. Use a `${cmake_ninja_workdir}` placeholder
to avoid repeating the base path. For example:
build out.txt | ${cmake_ninja_workdir}out.txt: CUSTOM_COMMAND ...
Ninja will create two nodes for the output file, one with a relative
path and one with an absolute path. A depfile may then mention either
form of the path and Ninja will hook up the dependency. Unfortunately
Ninja will also stat the file twice.
Issue: #13894
Fixes: #21865
|
| | |/
| | |
| | |
| | |
| | |
| | | |
Exclude the case on generators where it does not yet work.
Issue: #21865
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
99ff75455e install: Implement new install(CODE|SCRIPT) option ALL_COMPONENTS
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6140
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | | |
Fixes #22187
|
| |/
| |
| |
| |
| | |
Allows us to provide better error messages when commands such as
`--target` are passed invalid input.
|