Commit Graph

7126 Commits

Author SHA1 Message Date
Robert Maynard
7f39ea3318 NinjaMultiConfig: CUDA executables generate symbols on windows 2020-01-31 12:05:11 -05:00
Brad King
89a3d33d11 Merge topic 'automoc-using-depfiles'
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
2020-01-30 09:52:33 -05:00
Brad King
38ee7db2ac Merge topic 'mixed-mode-multi-arch'
15f6606abd Swift: disallow multiple `CMAKE_OSX_ARCHITECTURES` with Swift

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4283
2020-01-29 10:32:38 -05:00
Saleem Abdulrasool
15f6606abd Swift: disallow multiple CMAKE_OSX_ARCHITECTURES with Swift
This disallows the use of multiple values in `CMAKE_OSX_ARCHITECTURES`
with Swift which does not support FAT compilation.
2020-01-28 10:13:28 -08:00
Brad King
a4d7a79beb Merge topic 'ninja-1.10'
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
2020-01-28 11:35:24 -05:00
Joerg Bornemann
aebfbcaa46 AutoGen: Use depfiles for the XXX_autogen ninja targets
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
2020-01-28 11:16:11 -05:00
Joerg Bornemann
f765fdea03 AutoGen: Use moc's feature to output dependencies
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: #17750
Fixes: #19058
2020-01-28 11:16:11 -05:00
Joerg Bornemann
f8c505d4b3 Add a parser for GCC-style depfiles
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.
2020-01-28 11:16:11 -05:00
Brad King
7706b6a714 Merge topic 'xcode-top-level-only-with-object-library'
64304fe72b Xcode: Fix post build script for 'top level project only' opt

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4284
2020-01-28 11:05:17 -05:00
Brad King
b6da71e299 Merge topic 'osx-version-flags'
6a84f0b791 macOS: Test OSX_COMPATIBILITY_VERSION and OSX_CURRENT_VERSION properties
4a62e3d97c macOS: Add OSX_COMPATIBILITY_VERSION and OSX_CURRENT_VERSION properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4274
2020-01-28 10:59:03 -05:00
Brad King
e4e41d33d6 Merge topic 'cmsting-stl-compatibility'
8f839d02e3 cm::String: enhance compatibility with STL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4281
2020-01-28 10:58:11 -05:00
Brad King
1f9321c683 Merge topic 'cuda_runtime_library_controls'
0d0145138f CUDA: Add abstraction for cuda runtime selection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4178
2020-01-28 10:52:33 -05:00
Brad King
d6028df6a5 Merge topic 'install-name-tool-bug'
162e8aeb9e Tests: Disable test on problematic versions of install_name_tool

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4276
2020-01-28 10:46:10 -05:00
Yauheni Khnykin
64304fe72b Xcode: Fix post build script for 'top level project only' opt
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
2020-01-27 16:14:19 -05:00
Robert Maynard
0d0145138f CUDA: Add abstraction for cuda runtime selection
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.
2020-01-27 16:02:26 -05:00
Brad King
6a84f0b791 macOS: Test OSX_COMPATIBILITY_VERSION and OSX_CURRENT_VERSION properties
Issue: #17652
2020-01-27 14:19:35 -05:00
Brad King
0944caaebb Tests: Fix RunCMake.CMP0037 test with Ninja 1.10
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.
2020-01-27 13:26:40 -05:00
Brad King
9d4883cce5 Tests: Fix RunCMake.Ninja test for Ninja 1.10
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.
2020-01-27 13:26:40 -05:00
Brad King
f624b44524 Merge topic 'fix-ninja-multi-framework-header'
63c9cd2088 Ninja Multi-Config: Fix bug with MacOS frameworks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4279
2020-01-27 10:06:53 -05:00
Brad King
306328ace8 Merge topic 'depend-on-target-real-name'
08699cec68 add_custom_command: Fix dependency on macOS framework target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4273
2020-01-27 10:04:08 -05:00
Brad King
0bf9589bf1 Merge topic 'csharp-no-valued-macros'
effd4d0569 CSharp: Do not pass definitions with values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4267
2020-01-27 10:03:26 -05:00
Kyle Edwards
162e8aeb9e Tests: Disable test on problematic versions of install_name_tool
According to https://cmake.org/pipermail/cmake-developers/2015-September/026462.html,
there is a bug in Xcode 7.0's install_name_tool that manifests when we
try to test file(GET_RUNTIME_DEPENDENCIES). Add a cache option to disable
this test.
2020-01-27 09:52:54 -05:00
Brad King
647ff12ca6 Merge topic 'stl-support'
73d1da4f86 Stl support: cm::append now supports any sequential container

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4251
2020-01-27 09:31:22 -05:00
Brad King
e0a288b0ff Merge topic 'FindGTest-upstream-lib-names'
fbd3ea2047 FindGTest: Add GTest::{gtest,gtest_main} library names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4268
2020-01-27 09:29:10 -05:00
Brad King
64e3bb4aee Merge topic 'cpack-deb-fix-description'
baec299ecd CPack: Fix regression in Deb description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4271
2020-01-27 09:27:36 -05:00
Marc Chevrier
8f839d02e3 cm::String: enhance compatibility with STL 2020-01-25 18:16:16 +01:00
Kyle Edwards
63c9cd2088 Ninja Multi-Config: Fix bug with MacOS frameworks 2020-01-24 17:16:25 -05:00
Brad King
072a95350c Merge topic 'ninja-multi-cross-configs'
b7a2baf38c Ninja Multi-Config: Add variable to control configs used in cross-config build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4269
2020-01-24 15:02:20 -05:00
Sumit Bhardwaj
effd4d0569 CSharp: Do not pass definitions with values
The Microsoft C# tooling does not accept definitions with values.
Filter them out.

Fixes: #19817
2020-01-24 14:43:37 -05:00
Brad King
08699cec68 add_custom_command: Fix dependency on macOS framework target
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
2020-01-24 11:29:45 -05:00
Brad King
786b56942b Merge topic 'vs-dotnet-standard-core'
ae1e1909a1 VS: Add support for .NET Standard and .NET Core

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4240
2020-01-24 10:55:26 -05:00
Paweł Bylica
fbd3ea2047 FindGTest: Add GTest::{gtest,gtest_main} library names
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
2020-01-24 10:18:36 -05:00
Marc Chevrier
73d1da4f86 Stl support: cm::append now supports any sequential container 2020-01-24 15:55:32 +01:00
Brad King
816bbf227f Merge topic 'trace_json_timestamp'
c829f0cfca trace: Add time and stack level to JSON output format

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Volo Zyko <volo.zyko@gmail.com>
Merge-request: !4242
2020-01-24 09:19:55 -05:00
Joerg Bornemann
ae1e1909a1 VS: Add support for .NET Standard and .NET Core
Fixes: #20105
2020-01-24 09:11:05 -05:00
Kyle Edwards
baec299ecd CPack: Fix regression in Deb description
Fixes: #20254
2020-01-24 08:50:43 -05:00
Kyle Edwards
b7a2baf38c Ninja Multi-Config: Add variable to control configs used in cross-config build 2020-01-23 15:47:12 -05:00
Brad King
f0f7ea2bf5 Merge topic 'get-runtime-dependencies-keyword-args'
3573f62a16 Merge branch 'backport-get-runtime-dependencies-keyword-args'
c998c8d560 file(GET_RUNTIME_DEPENDENCIES): Tolerate empty list arguments
4c8a917a87 file(GET_RUNTIME_DEPENDENCIES): Tolerate empty list arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4262
2020-01-23 10:02:45 -05:00
Kyle Edwards
c998c8d560 file(GET_RUNTIME_DEPENDENCIES): Tolerate empty list arguments
Also list all keywords that were missing values instead of only the
first one.
2020-01-22 14:34:33 -05:00
Kyle Edwards
4c8a917a87 file(GET_RUNTIME_DEPENDENCIES): Tolerate empty list arguments
Also list all keywords that were missing values instead of only the
first one.
2020-01-22 13:05:46 -05:00
Kyle Edwards
8337ed0d73 Ninja Multi-Config: Add variable to control aliases in build.ninja 2020-01-22 10:26:21 -05:00
Kyle Edwards
110037369d Refactor: Split Ninja files into impl-<Config>.ninja and build-<Config>.ninja 2020-01-22 10:26:21 -05:00
Frank Winklmeier
c829f0cfca trace: Add time and stack level to JSON output format
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.
2020-01-22 09:58:52 -05:00
Brad King
15c573df41 Merge topic 'mark_as_advanced-without-cache'
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
2020-01-22 09:50:49 -05:00
Brad King
65a3c68259 Tests: Make CMake.FileDownload invalid host name case more robust
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.
2020-01-21 09:37:45 -05:00
Ben Boeckel
3ec82b713e cmMarkAsAdvancedCommand: ignore variables which don't exist in the cache
Fixes: #18331
2020-01-20 15:49:29 -05:00
Brad King
941c09616b Merge topic 'multi-ninja-pch'
a55df20499 Multi-Ninja: Add precompile headers support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4201
2020-01-20 11:59:28 -05:00
Brad King
bf3142e253 Merge topic 'fphsa-name-mismatch'
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
2020-01-20 11:53:14 -05:00
Brad King
9b9dfacaa5 Merge topic 'acc-fix-in-source-depends-path'
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
2020-01-20 11:52:00 -05:00
Cristian Adam
a55df20499 Multi-Ninja: Add precompile headers support
Fixes: #19789
2020-01-17 23:17:35 +01:00