aebfbcaa46 AutoGen: Use depfiles for the XXX_autogen ninja targets
f765fdea03 AutoGen: Use moc's feature to output dependencies
f8c505d4b3 Add a parser for GCC-style depfiles
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Jan Niklas Hasse <jhasse@bixense.com>
Merge-request: !4221
ccaa0bccc4 Ninja: Do not clean metadata when re-generating inside a running build
657820a00b Ninja: Track when running to re-generate during a build
b12b013028 Ninja: Factor metadata cleanup into dedicated method
5d92e60d81 Ninja: Skip cleandead and recompact if build.ninja is missing
dd0a4718fd Ninja: Fix CMAKE_NINJA_OUTPUT_PATH_PREFIX with Ninja 1.10
0944caaebb Tests: Fix RunCMake.CMP0037 test with Ninja 1.10
9d4883cce5 Tests: Fix RunCMake.Ninja test for Ninja 1.10
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4290
The XXX_autogen targets are implemented as utility commands, which
means they always run, even if there weren't any changes.
For the Ninja generator and Qt >= 5.15 we're taking a different
approach: This commit adds custom commands that create
XXX_autogen/timestamp files. Those custom commands have a depfile
assigned that is generated from the depfiles that were created by moc.
The XXX_autogen targets merely wrap the XXX_autogen/timestamp custom
commands.
Fixes: #18749
In Qt version 5.15.0 moc learned to output the dependencies
of the generated file.
This commit enhances JobCompileMocT to read the dependency file
written by moc. The dependencies are stored in the same cache that's
used for the dependencies determined by dependency filters.
The dependency filter functionality is turned off if moc's dependency
output feature is used.
Fixes: #17750Fixes: #19058
Introduce the function cmReadGccDepfile that parses a GCC-style depfile
and returns its content. The implementation uses a lexer that is
modeled after the re2c implementation in Ninja.
The sample files of the autotest have been created with gcc 8.3.0.
This depfile reader is to be used by the Autogen facility to make use
of the depfiles that are generated by Qt's meta object compiler.
When CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY is set on
Xcode generator created post build scripts which tried to call
XCODE_DEPEND_HELPER.make script in subproject.
But XCODE_DEPEND_HELPER.make don't exist in
subprojects when mentioned option is set on.
Fixes: #20262
Fixes#17559
Replace our hard-coded default of cudart=static with a first-class abstraction to select the runtime library from an enumeration of logical names.
The CMP0037 OLD and WARN cases that actually use reserved target names
like `all` produce `build.ninja` files with duplicate build statements
producing the same output. With Ninja 1.10 and above we run ninja
tools at the end of generation that require `build.ninja` to be loadable.
It is not loadable for these test cases, so skip them.
With Ninja 1.10 we run the cleandead and recompact tools after
generation. These require that `build.ninja` be loadable. Update the
`CustomCommandJobPool` case to define the referenced job pools to make
`build.ninja` loadable.
b7a2baf38c Ninja Multi-Config: Add variable to control configs used in cross-config build
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4269
When the `DEPENDS` option names a logical target name, convert to the
"real" path of that target rather than any of the symlink-provided
alternative file names. This makes the dependencies consistent with the
outputs named by link rules producing the target artifacts.
Fixes: #20264
This introduces 2 new INTERFACE IMPORTED libraries: GTest::gtest and
GTest::gtest_main. They link to GTest::GTest and GTest::Main targets
respectively, therefore working as aliases. These new names map the
names of the targets from upstream GTest's CMake package config.
Fixes: #20255
Add the timestamp and stack depth of the function call to the JSON trace
output format. This information can be useful for cmake profiling and
call stack inspection (see e.g. https://github.com/volo-zyko/cmake-profile-stats).
Improve unit test to allow for varying set of keys to check in trace lines.
3ec82b713e cmMarkAsAdvancedCommand: ignore variables which don't exist in the cache
701a5c60e0 cmake: avoid marking local or unused variables as advanced
af158149e7 FindOpenSSL: do not mark a local variable as advanced
74f659f1f2 FindCurses: only mark CURSES_EXTRA_LIBRARY when it is used
7e2ae4e96d FindOpenGL: only mark declared cache variables as advanced
7cc02a0c29 FindLua: only mark LUA_MATH_LIBRARY as advanced if required
85cd26b8a6 FindBoost: only mark Boost_DIR as advanced if defined
338c7916ba CTest: avoid marking undeclared cache variables as advanced
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4150
Use a well-defined `.invalid` top-level domain instead of assuming there
is no `.png` top-level domain. Extend the timeout of this one case to
30 seconds to give DNS lookups a chance to fail instead of timing out.
be4d1bdf9a FPHSA: acknowledge the name mismatches in CMake-owned modules
ee4673c1ae FPHSA: detect package name mismatches
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Eric Noulard <eric.noulard@gmail.com>
Merge-request: !4123
ba3a417dce Tests/CustomCommand: add a test for depending on a `./path`
e23475dc73 Tests/CustomCommand: fix custom command line to actually make its output
db4780d584 cmGeneratorTarget: search for relative paths to the binary directory
ec479f101f cmLocalGenerator: collapse the path after construction
fd0ba705ce add_custom_command: check if a relative path should be an in-source path
fd84f510f8 cmLocalGenerator: simplify the current source dir query
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4195