Commit Graph

26781 Commits

Author SHA1 Message Date
Brad King
40bbe50e23 CMake 3.15.2 2019-08-07 12:44:19 -04:00
Brad King
9a384e7304 Merge branch 'find_package-prefer-config-not-found' into release-3.15
Merge-request: !3653
2019-08-06 09:43:25 -04:00
Cristian Adam
8ed868606d find_package: Fix prefer-config mode to not fail on missing optional package
When `CMAKE_FIND_PACKAGE_PREFER_CONFIG` mode was set to `ON`, failure to
find a package was fatal even if it was not `REQUIRED`.  Fix this and
add a test case.

Fixes: #19557
2019-08-06 09:36:36 -04:00
Brad King
edca8d5c3a Merge branch 'fileapi-install-generators' into release-3.15
Merge-request: !3639
2019-08-02 11:06:22 -04:00
Brad King
d70a0f8681 fileapi: Fix codemodel target install destination for cross-dir rules
Since commit e89ad0f94e (install: Allow installing targets created in
another directory, 2018-06-18, v3.13.0-rc1~407^2) we support calling
`install(TARGETS)` for targets created in another directory.  However,
install generators are associated with the directory in which the call
to `install()` appears.  This may not be the same directory in which the
target is defined.  Record in each target the list of install generators
it has.

Fixes: #19546
2019-07-31 19:32:55 -04:00
Brad King
7d98cd0442 Merge branch 'source_group-tree-files' into release-3.15
Merge-request: !3630
2019-07-30 11:31:15 -04:00
Brad King
93af8a2583 source_group: Fix regression in relative FILES
Fix the check added in commit 8d93815d20 (source_group command ensures
that FILES arguments are actually files, 2019-04-25, v3.15.0-rc1~195^2)
to convert to an absolute path before checking for existence.

Also simplify the conversion to an absolute path.

Fixes: #19454
2019-07-30 11:29:58 -04:00
Brad King
4053d5737d Merge branch 'vs-spectre-off' into release-3.15
Merge-request: !3629
2019-07-30 11:20:59 -04:00
Brad King
f9b7c660d7 VS: Fix mapping of -Qspectre- flag
The mapping for this flag was added by commit 43aa632f57 (VS: Populate
`-Qspectre-` flag table entry for v142, 2019-01-24, v3.14.0-rc1~74^2~7).
However, it did not do anything because the special logic added by
commit bb60ed6e72 (VS: Add flag table entry for -Qspectre, 2018-10-08,
v3.13.0-rc1~4^2) to move the `SpectreMitigation` element from
`ClCompile` to the top level only handled the presence of the setting
and not its value.  Extend the special logic to carry the value too.

Fixes: #19535
2019-07-30 11:17:28 -04:00
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
f43a7d76c7 CMake 3.15.1 2019-07-26 07:50:55 -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
07b93cb185 Merge branch 'fix-emulator-arguments' into release-3.15
Merge-request: !3591
2019-07-23 08:38:57 -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
Brad King
fc2a7c8b3f Merge branch 'ctest-done-hash' into release-3.15
Merge-request: !3563
2019-07-19 12:01:04 -04:00
Betsy McPhail
da79075c4d CTest: Generate Done.xml before calculating its hash
Fixes: #19489
2019-07-19 12:00:30 -04:00
Brad King
d96bc3cf04 Merge branch 'vs-asmlist-dir' into release-3.15
Merge-request: !3569
2019-07-18 11:41:49 -04:00
Brad King
c1fc6c80c7 VS: Place intermediate files in the "ASM List Location" next to objects
The `AssemblerListingLocation` setting in VS project files is meant for
intermediate files created during the build much like object files.
When the VS 7 generator was first under development, commit 49aebe6c99
(new arch, 2002-09-04) placed both object files and the ASM list
location in the same directory.  Later commit f9aef0e422 (Generator now
creates a separate intermediate files directory for each target,
2005-07-27) moved the object files to a per-target directory but the
ASM list location was not moved with them.  Move it now.

Fixes: #19480
2019-07-18 11:40:58 -04:00
Saleem Abdulrasool
c8741e8ff5 Swift: Add library search paths for dependencies
When building Swift executables and libraries which import a module, an
implicit link will be added by the driver.  Because this links by name
rather than path, the library search path needs to be provided to
indicate where to find the library.  For all local dependencies, add the
library paths for the targets when linking.  This ensures that you can
link against local libraries without explicitly setting a library path.

Fixes: #19304
2019-07-17 20:45:19 -07:00
Saleem Abdulrasool
be0d404208 Support per-language library link flags
This changes the behaviour of the generators to use a per-language
library search path flag.  This is needed for multi-language projects
with different compilers (e.g. cl + gfortran).  Since the adjusted
variable has been part of the user settings, we control this based on a
policy.

Fixes: #19307
2019-07-17 20:44:58 -07:00
Brad King
79bcf4e165 CMake 3.15.0 2019-07-17 07:54:31 -04:00
Brad King
185e6a1288 Merge branch 'find_package-fix-NO_MODULE' into release-3.15
Merge-request: !3557
2019-07-16 09:12:56 -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
1810a61b39 Merge branch 'object-library-sbcs' into release-3.15
Merge-request: !3537
2019-07-12 07:22:01 -04:00
Brad King
54290adcba VS: Fix SBCS support for object libraries
In commit 3a53005f7d (Build object library targets in VS, 2012-03-12,
v2.8.8~29^2~13) we updated the condition for unicode but accidentally
left out the SBCS case support for object libraries.

Fixes: #19469
2019-07-12 07:20:23 -04:00
Brad King
14f69fab54 Merge branch 'fortran-submodule-cray' into release-3.15
Merge-request: !3504
2019-07-11 13:01:02 -04:00
Brad King
86ead0b5a3 CMake 3.15.0-rc4 2019-07-10 12:27:14 -04:00
Brad King
e902a11118 Merge branch 'cuda-imported-library-device-linking' into release-3.15
Merge-request: !3526
2019-07-10 08:57:47 -04:00
Robert Maynard
8895449648 CUDA: Restore device linking to imported static library targets
This ability was lost in commit 81b4d10d8f (CUDA: More exhaustive checks
to determine when to do device linking, 2019-05-09, v3.15.0-rc1~82^2)
and needs to be restored to use imported static libraries that have CUDA
symbols.
2019-07-09 11:13:41 -04:00
Brad King
1b52415cd4 Merge branch 'ccmake-clear-aliases' into release-3.15
Merge-request: !3529
2019-07-09 09:35:01 -04:00
Craig Scott
d7673a203c Merge branch 'loglevel-option-case-consistency' into release-3.15
Merge-request: !3521
2019-07-09 22:42:51 +10:00
Brad King
b66d61a8d0 cmGlobalGenerator: Do not persist alias targets across configures
In `ccmake` a single global generator instance may be used for multiple
configure step runs.  The `cmGlobalGenerator::ClearGeneratorMembers`
method is supposed to clear global state that is specific to each
configure run but forgot to clear alias targets.

Fixes: #19457
2019-07-08 14:40:46 -04:00
Willem Deconinck
33de4d27eb Fortran: Support compilers using no module prefix on submodule files
Define `CMAKE_Fortran_SUBMODULE_SEP` with an empty string to mean that
the compiler uses no module prefix on its submodule files.

Also add a default fallback to use the `.mod` extension when
`CMAKE_Fortran_SUBMODULE_EXT` is not set.  This is a better guess than
no extension at all.
2019-07-08 11:28:27 -04:00
Craig Scott
14ed40d670 Help: Use consistent levels for cmake --loglevel and message()
The message() command requires uppercase log levels. Even
though the cmake --loglevel option is not case sensitive, show
the supported values as uppercase to match the message()
docs as closely as possible, since they are related to the same
feature.

Also fixes the wrong string being shown for the warning level
by cmake --help.
2019-07-08 20:11:33 +10: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
963ddafeaa QtDialog: Use QPalette::WindowText instead of QPalette::Foreground
`QPalette::Foreground` is deprecated and was replaced by
`QPalette::WindowText` since at least Qt 4.8.

https://doc.qt.io/archives/qt-4.8/qpalette.html#ColorRole-enum

This replaces the `QPalette::Foreground` color role with `QPalette::WindowText`
in `QtDialog/RegexExplorer.cxx` to avoid compiler warnings.
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
753373579e CMake 3.15.0-rc3 2019-06-27 07:35:14 -04: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
07807a2006 VS: Use AddLanguageFlags to de-duplicate CMAKE_{CUDA,ASM*}_FLAGS lookup
Apply the refactoring from commit 707283981f (VS: Use AddLanguageFlags
to de-duplicate CMAKE_<LANG>_FLAGS* lookup, 2019-04-01,
v3.15.0-rc1~300^2) to the CUDA, ASM_MASM, and ASM_NASM languages too.
In particular, CUDA needs the MSVC runtime library selection logic
in the `AddLanguageFlags` method that is used by other generators.
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
Francisco Facioni
eda4c43879 Ninja: Fix CUDA device linking when using response files
Fix the logic added by commit d91b5a72cd (Ninja: Add support for CUDA
nvcc response files, 2019-05-30, v3.15.0-rc1~8^2) to always use the CUDA
compiler response file flag for response files during device linking.
2019-06-25 14:30:36 -04:00
Brad King
5c7880956f CMake 3.15.0-rc2 2019-06-19 08:33:48 -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
Brad King
e815fad43f Merge branch 'capabilities-fileapi' into release-3.15
Merge-request: !3442
2019-06-17 07:56:39 -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