6518 Commits

Author SHA1 Message Date
Brad King
601fe84bd1 Swift: Restore support for enabling with INTERFACE libraries
The check added in commit b06f4c8a74 (Swift: disallow WIN32_EXECUTABLE
properties, 2019-05-31, v3.15.0-rc1~9^2) makes sense only for
executables because the `WIN32_EXECUTABLE` property is defined only for
them.  Running the check on other target types, particularly those that
do not link such as INTERFACE libraries, violates internal assumptions.
In particular, `GetLinkerLanguage` should not be called on such targets.

Fixes: #19528
2019-07-29 15:24:29 -04:00
Brad King
070a5e3835 Merge branch 'makefile-depend-relative-include' into release-3.15
Merge-request: !3599
2019-07-25 07:15:42 -04:00
Brad King
d46bac5d38 Makefile: Fix regression in dependencies on relative includes
Since commit a13a5c948e (Replace use of CollapseCombinedPath with
CollapseFullPath, 2019-03-19, v3.15.0-rc1~361^2~1), one code path now
calls `CollapseFullPath` with a base path that may be relative.
Backport KWSys commit c6f8e24a3 (SystemTools: Fix CollapseFullPath with
relative base path, 2019-07-24) to handle such base paths.

This case occurs when a build tree is placed in a directory inside a
source tree such that CMake is willing to generate a relative path from
the build tree to the source tree.  Add a test covering this case.

Fixes: #19507
2019-07-24 11:37:31 -04:00
Brad King
420073e536 Merge branch 'backport-clang-gnulike-support' into release-3.15
Merge-request: !3592
2019-07-24 08:12:51 -04:00
Brad King
4f15a6a5c2 Tests: Revert "require C++14 for the Tutorial"
Revert commit a2a90f41e3 (Tests: require C++14 for the Tutorial,
2019-03-21, v3.15.0-rc1~41^2~2).  In commit d50b31be35 (Clang: For MSVC
ABI do not use modes older than C++14, 2019-07-23) we fixed the C++
standard selection for GNU-like Clang with the MSVC ABI so the test code
itself no longer needs to do it.  In particular, changing the tests in
this way broke the tutorial's narrative.
2019-07-24 08:02:37 -04:00
Brad King
d50b31be35 Clang: For MSVC ABI do not use modes older than C++14
Since commit d44c0db0b2 (clang: setup correct configuration in gnu mode,
2019-02-20, v3.15.0-rc1~41^2~5) we support the GNU-like Clang that
targets the MSVC ABI.  However, Clang cannot compile with the MSVC
standard library unless it runs in a mode aware of C++14 (since MSVC
itself does not even have a lower mode).  When `CMAKE_CXX_STANDARD` is
set to 98 or 11, use C++14 anyway.

Since Clang's default mode is aware of C++14, another option is to not
add any flags for 98 or 11.  However, if a future Clang version ever
defaults to a higher C++ standard, setting the standard to 98 or 11
should at least not use a mode higher than 14.

Also revert test updates from commit 4819ff9647 (Tests: fix failures
with gnu mode clang on windows, 2019-03-21, v3.15.0-rc1~41^2~3) that
were meant to work around the standard selection problem.

Fixes: #19496
2019-07-24 07:40:30 -04:00
Marek Antoniak
bf6f5467a0 Fix allocation in CROSSCOMPILING_EMULATOR evaluation
In commit fec441ec17 (Teach CROSSCOMPILING_EMULATOR to support
arguments, 2019-05-30, v3.15.0-rc1~6^2) the new member
`cmCustomCommandGenerator::EmulatorsWithArguments` was not initialized
to the proper size.  Fix this and add a test case covering the crash
that could occur with multiple commands where an emulator appears only
in a later command.

Fixes: #19500
Co-Author: Brad King <brad.king@kitware.com>
2019-07-23 08:33:31 -04:00
Cristian Adam
f2edccea66 find_package: Fix NO_MODULE under CMAKE_FIND_PACKAGE_PREFER_CONFIG
The module mode fallback added by commit 22e65d10c1 (find_package: Fixed
CMAKE_FIND_PACKAGE_PREFER_CONFIG Module fallback, 2019-06-13,
v3.15.0-rc2~6^2) should not be used unless the `find_package` call
allows module mode.  Doing so can lead to infinite recursion if a find
module tries to call config mode with `find_package(...  NO_MODULE)`.
Fix the logic and add a test case.

Fixes: #19478
2019-07-16 09:09:24 -04:00
Brad King
0a7b61269c Merge branch 'backport-implicit-includes-cray-hlist' 2019-07-09 13:13:26 -04:00
Chuck Atkins
98e371f13e Cray: Fix include parsing when the -hlist= flag is present
Update parsing logic from commit 5990ecb741 (Compute implicit include
directories from compiler output, 2018-12-07, v3.14.0-rc1~108^2)
to handle the quoting behavior caused by the `-hlist=` flag.
2019-07-09 13:12:52 -04:00
Brad King
c56201bdac Merge branch 'qt-5.13' into release-3.15
Merge-request: !3500
2019-07-01 10:23:48 -04:00
Sebastian Holtermann
1a2d6bdefc Tests: Autogen: Use valid rcc compression levels
Avoid the invalid compression level 0 when invoking rcc.
It let's rcc fail with an error since Qt 5.13.
2019-07-01 09:18:24 -04:00
Brad King
7a3d9b08b9 Merge branch 'cuda-no-device-link-when-disabled' into release-3.15
Merge-request: !3491
2019-07-01 08:36:28 -04:00
Robert Maynard
a4d502a5bf CUDA: Do not device link if CUDA is not an enabled language
Checks added in commit 81b4d10d8f (CUDA: More exhaustive checks to
determine when to do device linking, 2019-05-09, v3.15.0-rc1~82^2)
assumed that CUDA properties would be set only if CUDA is enabled.

We cannot do a device link step if we do not have the CUDA language
enabled.  This was discovered as some projects unconditionally set CUDA
properties such as `CUDA_RESOLVE_DEVICE_SYMBOLS` even when the CUDA
language has not been enabled.

Fixes: #19432
2019-07-01 08:29:10 -04:00
Alex Turbov
822abf1265
list(POP_FRONT): Fix always assigning first item to output vars
Fixes: #19436
2019-06-30 13:15:29 +03:00
Brad King
d9a9150351 Merge branch 'cuda-msvc-runtime-library' into release-3.15
Merge-request: !3485
2019-06-26 08:43:19 -04:00
Brad King
8fbd25772f CUDA: Implement MSVC runtime library abstraction
In commit fb3370b6a1 (MSVC: Add abstraction for runtime library
selection, 2019-04-10, v3.15.0-rc1~229^2) we overlooked updating flags
for CUDA on Windows, where nvcc uses MSVC as the host compiler.  Add
them now and update the MSVCRuntimeLibrary test to cover CUDA.

Fixes: #19428
2019-06-26 08:36:48 -04:00
Brad King
edec1c2615 Merge branch 'export-targets-empty' into release-3.15
Merge-request: !3484
2019-06-26 06:53:40 -04:00
Brad King
2ba5c37b3f export: Restore support for empty TARGETS list
Refactoring in commit f5acecaa6f (cmExportCommand: Port to
cmArgumentParser, 2019-03-23, v3.15.0-rc1~270^2~3) broke the `export`
command's support for specifying `TARGETS` with no entries.  Fix it and
add a test case.

Fixes: #19415
2019-06-25 17:23:34 -04:00
Rolf Eike Beer
736f38ff34 FindIconv test: request C++11 2019-06-25 15:14:02 +02:00
Brad King
65fc109dc6 Merge branch 'FindBoost-component' into release-3.15
Merge-request: !3438
2019-06-18 08:37:52 -04:00
Alexander Grund
830b332f32 FindBoost: Add tests for legacy variables 2019-06-18 08:33:36 -04:00
Alexander Grund
4cb652e1d3 Tests.RunCMake.FindBoost: Fix example BoostConfig 2019-06-18 08:24:42 -04:00
Alexander Grund
7251d54bd1 Tests.FindBoost: Don't use BoostConfig in MODULE test 2019-06-18 08:22:50 -04:00
Brad King
3d8216330d Merge branch 'find_package_prefer_config_fix' into release-3.15
Merge-request: !3446
2019-06-17 07:59:46 -04:00
Cristian Adam
22e65d10c1 find_package: Fixed CMAKE_FIND_PACKAGE_PREFER_CONFIG Module fallback
Fixes: #19361
2019-06-13 23:58:30 +02:00
Brad King
c932f49842 cmake: Teach -E capabilities to report supported fileapi requests
Fixes: #19339
2019-06-07 11:08:38 -04:00
Brad King
c0f00079a9 Tests: Fix RunCMake.ctest_update test to not require GIT_EXECUTABLE
Fix the test case added by commit 95db11fdb1 (ctest: Include ChangeId in
Update.xml, 2019-04-23) to work in a release branch of CMake.
The `GIT_EXECUTABLE` value is not set before we add this test in
release branch builds.
2019-06-04 12:27:32 -04:00
Brad King
842f70c493 Merge topic 'emulator-arguments'
fec441ec17 Teach CROSSCOMPILING_EMULATOR to support arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3402
2019-06-04 08:37:55 -04:00
Brad King
a7d2efc15b Merge topic 'remove_directories'
07a80c7002 cmake: Teach -E remove_directory to remove multiple directories
013bee698e Tests: Add RunCMake.CommandLine make_directory test checks
3eb16de327 Tests: Fix RunCMake.CommandLine make_directory test name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3411
2019-06-04 08:37:04 -04:00
Brad King
65f5df7d08 Merge topic 'executables-are-consoled'
b06f4c8a74 Swift: disallow WIN32_EXECUTABLE properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3410
2019-06-04 08:34:21 -04:00
Brad King
4b68baa776 Merge topic 'compiler_id_gen_exp_supports_multiple_ids'
162555d7ec Help: Add release notes for updated generator expressions
808b818063 Genex: CompileLang and CompileLangAndId now match against a list of ids
9fd602bfd3 Genex: PlatformId now can match against a list of ids.
ec66af2026 Genex: CompilerId now can match against a list of ids.
2d4787fc4d Genex: Add more extensive support for an unbounded number of parameters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3405
2019-06-04 08:32:19 -04:00
Brad King
d4108f5585 Merge topic 'check_language_respects_cuda_host_compiler'
fada8cbfd6 CheckLanguage: Report CMAKE_CUDA_HOST_COMPILER if needed for compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3407
2019-06-04 08:30:26 -04:00
Brad King
99b9b01c02 Merge topic 'print-correct-line-number'
3475e2728b cmListFileCache: When missing ending ) print starting line instead of last one

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3398
2019-06-04 08:28:09 -04:00
Brad King
e591e22d4c Merge topic 'better_error_message_for_visibility_preset_property'
619416f8a3 The error message for VISIBILITY_PRESET now documents valid options.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3409
2019-06-04 08:25:47 -04:00
Brad King
f263650f95 Tests: Fix RunCMake.CommandLine test to use generator in no-S-B case
Apply the fix from commit baed22c4b0 (Tests: Fix RunCMake.CommandLine
test to use generator with -S and -B, 2019-04-10) to the `no-S-B` case
too.  It also generates a build system and should use the generator
being tested.
2019-06-03 14:57:19 -04:00
John Freeman
07a80c7002 cmake: Teach -E remove_directory to remove multiple directories
The `make_directory` command can make multiple directories in a single
invocation.  Make `remove_directory` mirror that behavior.
2019-06-03 14:20:00 -04:00
John Freeman
013bee698e Tests: Add RunCMake.CommandLine make_directory test checks 2019-06-03 14:17:11 -04:00
John Freeman
3eb16de327 Tests: Fix RunCMake.CommandLine make_directory test name 2019-06-03 14:16:50 -04:00
Saleem Abdulrasool
b06f4c8a74 Swift: disallow WIN32_EXECUTABLE properties
Currently, the compiler does not synthesize the correct entry point for
the application and passing the subsystem flag does not work the same
way with the Swift linker language.  Add a check to prevent the
application of `WIN32_EXECUTABLE` to Swift executables until they can be
properly supported.  This will prevent the need for a future policy
change.

Closes: #19325
2019-06-03 14:05:10 -04:00
Robert Maynard
fada8cbfd6 CheckLanguage: Report CMAKE_CUDA_HOST_COMPILER if needed for compilation
Fixes: #19013
2019-06-03 10:36:06 -04:00
Robert Maynard
808b818063 Genex: CompileLang and CompileLangAndId now match against a list of ids
This allows for expressions such as:

 $<COMPILE_LANG_AND_ID, CXX, GNU, Clang>
2019-06-03 10:20:23 -04:00
Robert Maynard
9fd602bfd3 Genex: PlatformId now can match against a list of ids. 2019-06-03 10:20:23 -04:00
Robert Maynard
ec66af2026 Genex: CompilerId now can match against a list of ids.
This allows for expressions like:
 $<$<CXX_COMPILER_ID:Clang,GNU>:-DMY_PRIVATE_DEFINE>
2019-06-03 10:20:23 -04:00
Marek Antoniak
fec441ec17 Teach CROSSCOMPILING_EMULATOR to support arguments
Fixes: #19321
2019-06-03 10:17:17 -04:00
Bartosz Kosiorek
3475e2728b cmListFileCache: When missing ending ) print starting line instead of last one
Fixes: #19301
2019-06-03 10:03:53 -04:00
Robert Maynard
619416f8a3 The error message for VISIBILITY_PRESET now documents valid options.
Rather than just state the value for VISIBILITY_PRESET was invalid,
we additionally list the accepted values.
2019-06-03 09:56:03 -04:00
Brad King
187928875d Merge topic 'vs-add-package-reference'
42e14d90b1 VS: Added support for VS package references for nuget

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Leonid Pospelov <pospelovlm@yandex.ru>
Merge-request: !3389
2019-05-31 13:18:31 -04:00
Brad King
0d025f75c1 Merge topic 'implicit-includes-CPATH'
2d0b0e2b9d Do not exclude include directories made implicit by CPATH

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3395
2019-05-31 09:03:28 -04:00
Kinan Mahdi
42e14d90b1 VS: Added support for VS package references for nuget 2019-05-30 10:22:44 -04:00