Commit Graph

7162 Commits

Author SHA1 Message Date
Kyle Edwards
cc4e304800 Tests: Fix CFBundleTest for Ninja Multi-Config 2020-02-25 13:39:46 -05:00
Kyle Edwards
bcf4da52d8 Tests: Fix CustComDepend test for Ninja Multi-Config 2020-02-25 13:39:46 -05:00
Kyle Edwards
a5be3916ee CTest: Provide more detailed information on resource allocation error 2020-02-24 15:44:01 -05:00
Brad King
2dad438980 Merge topic 'ninja-multi-framework-dependency-autogen-fix' into release-3.17
7abc3d61ac Ninja Multi-Config: Fix issue with framework dependencies and Autogen

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4363
2020-02-18 11:20:56 -05:00
Kyle Edwards
7abc3d61ac Ninja Multi-Config: Fix issue with framework dependencies and Autogen
Fixes: #20345
2020-02-17 08:24:57 -05:00
Craig Scott
ef3194a6f8 ExternalProject: Quote each git --config option to handle spaces
Fixes: #20354
2020-02-15 13:23:56 +11:00
Craig Scott
40d1d29cfa Tests: Add missing ExternalProject smoke tests 2020-02-15 13:23:46 +11:00
Craig Scott
afc8956765 Tests: Fix test_clean target missing some test directories 2020-02-15 13:23:37 +11:00
Brad King
645474dba1 Merge topic 'ninja-multi-default-configs-fix' into release-3.17
46c836644d Ninja Multi-Config: Fix issue with "all" in CMAKE_NMC_DEFAULT_CONFIGS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4349
2020-02-12 09:15:54 -05:00
Brad King
10b834a3eb Merge topic 'file-CONFIGURE_DEPENDS-verify-CMP0009' into release-3.17
818ec34bdd file: GLOB_RECURSE VerifyGlobs.cmake should have CMP0009 set to new
b620dc566d file: Fix GLOB_RECURSE LIST_DIRECTORIES documentation regarding CMP0009
715f90bdd9 Tests: Perform minor cleanups in RunCMake.file test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !4342
2020-02-12 09:15:07 -05:00
Brad King
96ee8b7266 Merge topic 'install-default-fix' into release-3.17
9442ae5083 install: Fix regression when using default destinations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4340
2020-02-12 09:05:31 -05:00
Kyle Edwards
46c836644d Ninja Multi-Config: Fix issue with "all" in CMAKE_NMC_DEFAULT_CONFIGS
Prior to this fix, CMAKE_NMC_DEFAULT_CONFIGS would inherit "all" from
the union of CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG and
CMAKE_NMC_CROSS_CONFIGS. This is inconsistent with the behavior of the
"all" target signifying CMAKE_NMC_CROSS_CONFIGS. Update "all" in
CMAKE_NMC_DEFAULT_CONFIGS to inherit only from CMAKE_NMC_CROSS_CONFIGS.
2020-02-11 10:49:54 -05:00
Shane Parris
818ec34bdd file: GLOB_RECURSE VerifyGlobs.cmake should have CMP0009 set to new
In certain cases, rebuilds with CMake using the CONFIGURE_DEPENDS flag
with GLOB_RECURSE could result in a reconfigure loop due to CMP0009 not
being propogated to the generated VerifyGlobs.cmake script.

During the inital configuration phase, RecurseThroughSymlinksOn() is
called for recursive glob operations either by having the CMP0009 status
not set to NEW or by explicitly providing the FOLLOW_SYMLINKS flag. At
the end when the VerifyGlobs script is created, the FOLLOW_SYMLINKS flag
is written according to the final resolved form through a call to
GetRecurseThroughSymlinks(). Thus, setting CMP0009 to NEW in the
generated file is safe and allows correct behavior whether or not the
end user sets the policy status to NEW or OLD.
2020-02-11 08:45:35 -05:00
Shane Parris
715f90bdd9 Tests: Perform minor cleanups in RunCMake.file test 2020-02-11 08:45:35 -05:00
Kyle Edwards
9442ae5083 install: Fix regression when using default destinations
In commit 9fc20a4f3e (install: Add sane set of defaults for DESTINATION
and file type parameters, 2018-11-02, v3.14.0-rc1~410^2~1), a regression
was introduced, in which an `install(TARGETS)` with a
RUNTIME/LIBRARY/ARCHIVE DESTINATION but no PUBLIC_HEADER/PRIVATE_HEADER
DESTINATION would then install the headers.  The old behavior did not do
this.  Restore the old behavior.

Fixes: #20326
2020-02-11 08:34:16 -05:00
Brad King
bdd4fb32ad Merge topic 'FindPython-reduce-resources-comsumption' into release-3.17
3dab4682f6 FindPython: reduces consumption of resources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4338
2020-02-11 08:21:06 -05:00
Brad King
8e39e0c3e3 Merge topic 'swift-no-sdk-include' into release-3.17
5c2a92f44f Swift: Exclude SDK include paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4315
2020-02-11 08:20:03 -05:00
Yauheni Khnykin
5c2a92f44f Swift: Exclude SDK include paths
Populate `CMAKE_Swift_IMPLICIT_INCLUDE_DIRECTORIES` with the macOS SDK's
include directory so that we filter such implicit directories out of
Swift targets.

Fixes: #19845
2020-02-10 10:32:37 -05:00
Marc Chevrier
3dab4682f6 FindPython: reduces consumption of resources
Stores more information in the cache to reduce the number
of sub-processes required on subsequent find_package calls.

Fixes: #20337
2020-02-10 12:41:04 +01:00
Kyle Edwards
67102d3252 Ninja Multi-Config: Add support for DEPFILE option in add_custom_command()
And give other generators a path forward to add support in the future.
2020-02-07 14:18:54 -05:00
Brad King
135378fd18 Merge topic 'ninja-multi-default-config-fix' into release-3.17
1844be451e Ninja Multi-Config: Fix issue with CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4331
2020-02-07 09:26:36 -05:00
Kyle Edwards
1844be451e Ninja Multi-Config: Fix issue with CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG
Fix an issue where CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG is specified
and CMAKE_NMC_CROSS_CONFIGS is not, which results in a false error
with CMAKE_NMC_DEFAULT_CONFIGS.
2020-02-06 14:31:13 -05:00
Kyle Edwards
9e219de4fb Ninja Multi-Config: Don't include MinSizeRel by default 2020-02-06 11:07:38 -05:00
Brad King
56ddef613d Merge topic 'ninja-multi-cmake-build-no-config'
bd4ae2af0f Help: Make note of ninja -f argument in Ninja Multi-Config docs
79e5b3c46a Help: Explain new behavior of cmake --build in Ninja Multi-Config
16a4ba5b31 Ninja Multi-Config: Use build.ninja if cmake --build has no --config
2ac835b9f9 Refactor: Allow generators to decide default configuration for build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4323
2020-02-05 09:11:10 -05:00
Kyle Edwards
16a4ba5b31 Ninja Multi-Config: Use build.ninja if cmake --build has no --config
If cmake --build is called with no --config argument, and a
build.ninja file is available, use that instead of defaulting to the
Debug config.
2020-02-04 14:13:07 -05:00
Thomas Bernard
1c2d031cbd Add -E cmake_llvm_rc to preprocess files for llvm-rc
llvm-rc requires preprocessed rc files. The CMake command line tool
cmake_llvm_rc enables channing the preprocessor call and the resource
compiler and make this appear as single compilation step.

When llvm-rc is detected as resource compiler, the RC compilation step
is set to use this command.
2020-02-04 08:19:12 -05:00
Brad King
5f04dfe57e Merge topic 'ninja-multi-variable-shuffle'
b966f86d86 Ninja Multi-Config: Shuffle variables around

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4305
2020-02-03 14:00:03 -05:00
Kyle Edwards
b966f86d86 Ninja Multi-Config: Shuffle variables around
Remove redundant variable CMAKE_NINJA_MULTI_CROSS_CONFIG_ENABLE.
Rename other variables. Document and improve handling of error
conditions.
2020-02-03 13:27:51 -05:00
Kyle Edwards
25bf64eca6 Merge topic 'ctest-add-ignore-no-tests-option'
a39d4139d0 Add --no-tests=<[error|ignore]> option to CTest

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4258
2020-02-03 13:22:02 -05:00
Brad King
b81aef19de Merge topic 'windows-gnu-asm'
97de48b528 Tests: Update Assembler code generation to select MSVC runtime library
6348ffb9e5 ASM: Hook up Windows-specific GNU/Clang compiler information modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4287
2020-02-03 11:51:34 -05:00
Brad King
adf5524689 Merge topic 'ninja_multi_config_test_understand_win_cuda'
7f39ea3318 NinjaMultiConfig: CUDA executables generate symbols on windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !4310
2020-02-03 11:48:08 -05:00
Brad King
97de48b528 Tests: Update Assembler code generation to select MSVC runtime library
The `Assembler` test runs the C compiler in a custom command to generate
a `.s` file for the platform.  When using the GNU-like Clang variant on
Windows, ensure that the custom command includes the MSVC runtime
library selection flags for Clang.  That way the resulting `.s` file,
when assembled into a `.obj`, will tell the linker what runtime library
it needs.
2020-01-31 14:37:34 -05:00
Stefan Dinkelacker
a39d4139d0 Add --no-tests=<[error|ignore]> option to CTest
If no tests were found, the default behavior of CTest is to always log an
error message but to return an error code in script mode only. This option
unifies the behavior of CTest by either returning an error code if no tests
were found or by ignoring it.

Signed-off-by: Stefan Dinkelacker <s.dinkelacker@dkfz-heidelberg.de>
2020-01-31 18:17:13 +01:00
Robert Maynard
7f39ea3318 NinjaMultiConfig: CUDA executables generate symbols on windows 2020-01-31 12:05:11 -05:00
Brad King
afcd9fe669 AIX: Add an option to disable automatic exports from shared libraries
Since commit 0f150b69d3 (AIX: Explicitly compute shared object exports
for both XL and GNU, 2019-07-11, v3.16.0-rc1~418^2~2) we always export
all symbols from shared libraries by default.  Add a new target property
called `AIX_EXPORT_ALL_SYMBOLS` that can be explicitly set to OFF to
suppress this behavior and export no symbols by default.

Fixes: #20290
2020-01-31 09:34:06 -05:00
Brad King
60edc83446 Merge topic 'GNUInstallDirs-no-system'
c18ed7236d GNUInstallDirs: Warn when CMAKE_SYSTEM_NAME is not set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4300
2020-01-31 08:46:27 -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
Vitaly Lipatov
c18ed7236d GNUInstallDirs: Warn when CMAKE_SYSTEM_NAME is not set
If a project writes `include(GNUInstallDirs)` before `project()` then
`CMAKE_SYSTEM_NAME` may not be set and an incorrect `LIBDIR` may be
computed.  Warn about this case.
2020-01-30 09:14:47 -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