| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| |
| |
| |
| |
| |
| | |
De-duplicate code paths calling ConvertToNinjaPath and
SeenCustomCommandOutput on custom command outputs and custom target
byproducts.
|
| |
| |
| |
| |
| | |
Re-order arguments to group those with similar roles.
Use move semantics to avoid copying vectors of strings.
|
| |
| |
| |
| | |
Save explicit dependencies earlier.
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
396e0a840e cmCommandLineArgument: OneOrMore mode supports `=` separator
372bf1bcc4 cmCommandLineArgument: Understands which commands require partial matching
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6142
|
| | |
| | |
| | |
| | | |
Fixes #22187
|
| | |
| | |
| | |
| | |
| | | |
Allows us to provide better error messages when commands such as
`--target` are passed invalid input.
|
| |/
|/| |
|
|\ \ |
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
364f6af1d7 NVHPC: Support Ninja dependency scanning
521cfc38a3 NVHPC: Support explicit language flags
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6136
|
|\ \ \ \
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
364f6af1d7 NVHPC: Support Ninja dependency scanning
521cfc38a3 NVHPC: Support explicit language flags
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6136
|
| | | |
| | | |
| | | |
| | | | |
Fixes: #22168
|
| | | | |
|
| |_|/
|/| | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
cbeff3082d .gitignore: Add CLion directories and VS build directory
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6138
|
|/ / / |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
8526756b61 cmOutputConverter: Adopt relative path conversion helpers
013ec595c8 cmLocalGenerator: De-duplicate StateSnapshot member
24bfdbcffb cmLocalGenerator: Remove unused MaybeRelativeToCurSrcDir method
d6fe1bdb6d cmLocalGenerator: Localize logic mapping source path to object file name
4cb6a53bf5 cmListFileCache: Simplify relative path conversion in backtraces
5b3a71a83f cmSystemTools: Adopt RelativeIfUnder helper
ea9b1d36b8 cmStateDirectory: Clarify relative path top selection logic
2d9109df7c cmStateDirectory: Remove network path logic from relative path top selection
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6128
|
| | | |
| | | |
| | | |
| | | | |
Move them up from cmLocalGenerator and out of cmStateDirectory.
|
| | | |
| | | |
| | | |
| | | | |
We have the member from the cmOutputConverter parent.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
With the recent update to `GetObjectFileNameWithoutTarget`, we no longer
have any call sites for `MaybeRelativeToCurSrcDir`. It does not make
sense for the generator to produce paths relative to the source tree in
general, so remove the method.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We select an object file name based on the path to its source file.
Localize the logic for shortening this via relative paths. It does not
need to use the generator-wide relative path conversion rules because we
are not actually generating a relative path that needs to be consistent
with anything else.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Printing paths to CMake input files does not need to use the
generator-wide relative path conversion rules because we are not
actually generating a relative path for the build system that needs to
be consistent with anything else. Instead, simply print a relative path
if it does not need to start in `../`, and otherwise an absolute path.
|
| | | |
| | | |
| | | |
| | | | |
This returns a relative path if it does not start in `../`.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Re-implement the same algorithm using direct iteration without
collecting a vector first.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The logic skipping relative paths for build trees on network paths came
from commit b5035770bc (BUG: On Windows network paths do not really
work..., 2003-12-24, v2.4.0~3517). However, since commit ad4055f3e2
(ENH: Set RelativePathTopSource and RelativePathTopBinary independently
..., 2007-03-07, v2.6.0~2061) we effectively ignore this logic if the
build tree is inside the source tree on a network path. Also, it is not
clear that logic using `RelativePathTopBinary` is prepared for it to be
empty. Remove the logic for now. If a problem comes up, we can choose
a new approach.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix the comment added by commit f6d4fa63f8 (cmStateDirectory: Comment
relative path top directory selection approach, 2021-05-13) to describe
the actual behavior.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In CMake 3.6 and below, running
cmake --build . --target "$(pwd)/SomeTarget"
with a Makefiles generator automatically converted the target
name and invoked `make SomeTarget`. This made the build command
work even though
make "$(pwd)/SomeTarget"
would fail. This behavior was not implemented for any other generators,
and does not make sense because `cmake --build` is supposed to be a thin
wrapper around the native build tool. It has also been broken since
commit 8d47a20f13 (cmOutputConverter: use new ConvertToRelativePath
signature internally, 2016-06-16, v3.7.0-rc1~90^2~1) because cmState's
relative path conversion logic is not initialized in `cmake --build`.
Remove the non-functioning code.
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
2eba7d7524 Help: Add SHELL, LINKER and host/device discussions to property docs
b20c1f4880 Help: Make SHELL option examples more generic
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6130
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Section headings are also added for each common block to help guide
the reader and improve navigation.
Fixes: #21640
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Comments at the bottom of the docs for add_compile_options() and
target_compile_options() recommend using other commands if setting
compiler definitions. Change the examples we use for the SHELL:
functionality to use -option instead of -D so that we don't violate our
own recommendations. This also makes the examples more
appropriate for use with link options as well.
Tweak the wording to not specify the type of option being discussed.
This will already be clear from the page the text is included into and
it avoids naming unrelated option types for the given page.
|
| |/ / /
|/| | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
cf3bc271d1 Help: Clarify details passed to ExternalProject configure and build
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6135
|
| |/ / /
| | | |
| | | | |
Fixes: #22116
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
b00a171b2b Help: Clarify calling cmake_minimum_required() inside a function
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6129
|
| |/ / /
| | | |
| | | | |
Fixes: #21519
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
929c8a7860 INTERFACE_POSITION_INDEPENDENT_CODE must be transitive for OBJECT library
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6127
|
| | | | |
| | | | |
| | | | |
| | | | | |
Fixes: #22174
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
caea48eec9 CMakeParseImplicitIncludeInfo: remove needless variable expansions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6125
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
They seem to actually cause trouble, like an error reported on IRC where some
but not all CMake invocations may end up with an error like this:
CMake Warning (dev) at /usr/share/cmake/Modules/CMakeParseImplicitIncludeInfo.cmake:74 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted keywords like ")" will no longer be interpreted as keywords when the
policy is set to NEW. Since the policy is not set the OLD behavior will be
used.
Call Stack (most recent call first):
/usr/share/cmake/Modules/CMakeParseImplicitIncludeInfo.cmake:179 (cmake_parse_implicit_include_line)
/usr/share/cmake/Modules/CMakeDetermineCompilerABI.cmake:119 (cmake_parse_implicit_include_info)
/usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
CMakeLists.txt:24 (project)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at /usr/share/cmake/Modules/CMakeParseImplicitIncludeInfo.cmake:74 (if):
if given arguments:
"GNU" "STREQUAL" "SunPro" "AND" "(" ")" "MATCHES" "-D__SUNPRO_C" "OR" ")" "MATCHES" "-D__SUNPRO_F" ")"
I suspect that the line ends up being just ")", which then causes this error.
|
| | | | | | |
|
| |_|/ / /
|/| | | | |
|
| | | | | |
|
|\ \ \ \ \
| | |_|_|/
| |/| | | |
|