Commit Graph

43765 Commits

Author SHA1 Message Date
Brad King
fc4cbbc2a5 Merge topic 'remove_unneeded_device_link_calls'
81b4d10d8f CUDA: More exhaustive checks to determine when to do device linking
3205c7c950 cmNinjaLinkLineDeviceComputer now lives in the correct source file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3320
2019-05-22 10:30:00 -04:00
Brad King
c024e44abe Merge topic 'find-package-prefer-config'
26a99da206 find_package: Add option to prefer Config mode
c365243a3a find_package: Factor out module and config find_package methods

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Merge-request: !3339
2019-05-22 10:28:59 -04:00
Brad King
aefd424b6b Merge topic 'swift-debug-variant'
62381effba Ninja,Swift: reuse `SWIFT_MODULE_NAME` for `SWIFT_MODULE`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3343
2019-05-22 10:28:00 -04:00
Brad King
f83f29dbaa Merge topic 'vs-ApplicationTypeRevision'
9c07cefee5 VS: Fix ApplicationTypeRevision in builtin check projects
639e14def6 VS: Factor out helper to compute ApplicationTypeRevision

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3350
2019-05-22 10:27:01 -04:00
Brad King
9e07ea190b Merge topic 'compiler-id-arch-only-iar'
4c0fb923b7 IAR: Do not print compiler architecture id for non-IAR compilers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3352
2019-05-22 10:25:50 -04:00
Brad King
021c61408c Merge topic 'ninja-lib-symlink-space'
13c92b4a30 Ninja: Fix creation of library symlinks in folders with spaces

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3341
2019-05-22 10:24:46 -04:00
Brad King
5a1af142f1 Genex: Fix value lifetimes in nested TARGET_PROPERTY evaluation
For special properties like `INCLUDE_DIRECTORIES`, the pointer returned
by `cmTarget::GetProperty` is only valid until the next time the same
special property is queried on *any* target.  When evaluating a nested
`TARGET_PROPERTY` generator expression we may look up such a property
more than once on different targets.  Fix `TargetPropertyNode::Evaluate`
to store the lookup result in locally owned memory earlier.

Fixes: #19286
2019-05-22 10:19:41 -04:00
Brad King
01b6a2c4ee Merge branch 'release-3.14' 2019-05-22 09:45:49 -04:00
Brad King
974f4abbf8 Merge topic 'libarchive-solaris-11.4'
6c81c6538b libarchive: avoid b64_encode name conflict with Solaris built-in function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3351
2019-05-22 09:44:28 -04:00
Craig Scott
ad32282a3e Merge topic 'file-remove-no-empty'
a1eb03569d file: Change REMOVE to ignore empty names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3349
2019-05-22 08:57:29 -04:00
Eicke Herbertz
d0f0ba0f7a Tests: Add environment generator tests 2019-05-22 07:40:51 -04:00
Eicke Herbertz
a48ce8f4bf Help: Add documentation for default generator environment variables
Documentation for environment variables that control the default
generator selection:

* CMAKE_GENERATOR
* CMAKE_GENERATOR_INSTANCE
* CMAKE_GENERATOR_PLATFORM
* CMAKE_GENERATOR_TOOLSET
2019-05-22 07:40:49 -04:00
Sebastian Holtermann
71d6a1455e Autogen: Evaluate compiler features for the same exectuable only once
To speed up the `AUTOGEN` configuration process, evaluate the compiler
features only once.  The feature evaluation result is stored in the new class
`cmQtAutoGen::CompilerFeatures`, and the instance is shared by using
`std::shared_ptr`.
2019-05-22 12:25:17 +02:00
Sebastian Holtermann
5b53cfda24 cmSystemTools: Remove cmSystemToolsFileTime interface
This removes the C style cmSystemToolsFileTime interface in cmSystemTools.
It was replaced by the RAII based cmFileTimes class.
2019-05-22 10:57:10 +02:00
Sebastian Holtermann
9c576a88d9 Use cmFileTimes instead of cmSystemToolsFileTime interface 2019-05-22 10:57:10 +02:00
Sebastian Holtermann
4b45a5d5c7 cmFileTimes: New RAII based cmFileTimes class
This adds a new RAII based cmFileTimes class.
It is supposed to replace the C style cmSystemToolsFileTime interface.
2019-05-22 10:57:10 +02:00
Kitware Robot
f01e18eb46 CMake Nightly Date Stamp 2019-05-22 00:01:06 -04:00
Bartosz Kosiorek
53cb1f2d04 cmake: Teach cmake -E tar command, Zstandard compression
Fixes #18657
2019-05-22 03:46:55 +02:00
Saleem Abdulrasool
02c14b7fcd Ninja,Swift: pass along DEFINES/FLAGS/INCLUDES
Since the Swift model does a single compile/link phase, we would not
get the compile definitions, includes, and options past along to the
build of the module.  Compute these for the target when constructing
the main command.
2019-05-21 08:53:50 -07:00
Robert Maynard
81b4d10d8f CUDA: More exhaustive checks to determine when to do device linking
Previously CMake used fairly naive logic to determine when to do
device linking which caused unnecessary device linking to occur
frequently. We now use a more exhaustive algorithm to determine
when we have a need for device linking.

Fixes: #19238
2019-05-21 11:40:07 -04:00
Saleem Abdulrasool
24223ac84b Modules: add Swift MSVC_RUNTIME_LIBRARY flags
This adds support for the newly minted `-libc` flag to the Swift driver
invocation.  These allow users to control the MSVC linkage properly on
Windows targets.
2019-05-21 08:38:23 -07:00
Saleem Abdulrasool
7e636fd8e0 Modules: add CMAKE_Swift_FRAMEWORK_SEARCH_FLAG
Swift supports frameworks and uses them across all OSes.  They are added
using the `-F` flag.  There must be a space following the flag and
before the parameter.
2019-05-21 08:38:23 -07:00
Saleem Abdulrasool
0fbf936b46 Modules: remove CMAKE_INCLUDE_FLAG_SEP_Swift
The include flag specifier should be specified multiply.  The separator
was being misused for adding a space after the `-I` flag.  Correct this
to get multiple include paths correct.
2019-05-21 08:38:23 -07:00
Brad King
4c0fb923b7 IAR: Do not print compiler architecture id for non-IAR compilers
The compiler identification message was modified in commit ea83d0f8fb
(IAR: Generalize and add support for IAR RX compiler, 2019-04-05) to
include the architecture id since IAR compilers are arch-specific.
Revise the logic to avoid modifying the message for other compilers.
2019-05-21 10:58:18 -04:00
Cristian Adam
26a99da206 find_package: Add option to prefer Config mode
Add a `CMAKE_FIND_PACKAGE_PREFER_CONFIG` variable to tell
`find_package` calls to look for a package configuration file
first even if a find module is available.

Fixes: #16805, #19236
2019-05-21 10:29:47 -04:00
Marc Chevrier
8517b549f4 FindPython: Add policy to manage lookup stratgey default. 2019-05-21 16:13:27 +02:00
Marc Chevrier
9f205acefe FindPython: Implement lookup strategies.
Configration variable Python_FIND_STRATEGY controls the lookup startegy.
Possible values are LOCATION and VERSION.

Fixes: #19159
2019-05-21 16:13:27 +02:00
Brad King
0bf5348329 Merge topic 'string-param'
273257222e Source: change parameters to std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3340
2019-05-21 09:46:45 -04:00
Brad King
8538685c85 Merge topic 'FindPostgreSQL-config-support'
368bcba28a FindPostgreSQL: Find debug lib, imported configs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3298
2019-05-21 09:44:19 -04:00
Brad King
389f795d2e Merge topic 'doc-ipo-check'
a59662bb5b Help: Add CheckIPOSupported link to INTERPROCEDURAL_OPTIMIZATION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3333
2019-05-21 09:40:03 -04:00
Brad King
fffb5f1a75 Merge branch 'libarchive-solaris-11.4' into release-3.14
Merge-request: !3351
2019-05-21 09:34:39 -04:00
Brad King
6c81c6538b libarchive: avoid b64_encode name conflict with Solaris built-in function
Solaris 11.4 has a built-in function named `b64_encode`.  Add a
`la_` prefix to our internal function to avoid conflict.

Fixes: #19268
2019-05-21 09:32:21 -04:00
Brad King
a1eb03569d file: Change REMOVE to ignore empty names
Previously code like

    file(REMOVE_RECURSE "${accidentally_missing_variable}")

treated the empty string as a relative path with respect to the
current directory and removed its contents.  Change this behavior
to ignore the empty string with a warning instead.

Normally such behavior changes are done with a policy, but in this case
such code is likely a real bug in project code that can delete data.

Fixes: #19274
2019-05-21 09:25:32 -04:00
Brad King
9c07cefee5 VS: Fix ApplicationTypeRevision in builtin check projects
Do not use the entire `CMAKE_SYSTEM_VERSION`, but rather the first two
components only.

Fixes: #19275
2019-05-21 08:50:37 -04:00
Brad King
639e14def6 VS: Factor out helper to compute ApplicationTypeRevision
This is the first two components of `CMAKE_SYSTEM_VERSION`.
2019-05-21 08:50:01 -04:00
Ruslan Baratov
26ea022c3b Add variable CMAKE_FRAMEWORK 2019-05-21 14:26:23 +03:00
Kitware Robot
1db0edb2a6 CMake Nightly Date Stamp 2019-05-21 00:01:06 -04:00
Cristian Adam
c365243a3a find_package: Factor out module and config find_package methods 2019-05-20 21:20:10 +02:00
Saleem Abdulrasool
62381effba Ninja,Swift: reuse SWIFT_MODULE_NAME for SWIFT_MODULE
Rather than compute the value of `SWIFT_MODULE`, use the computed value
of `SWIFT_MODULE_NAME`.  This is helpful strictly for Windows where you
have multiple configuration variants with differing ABIs that need must
co-exist.  In particular, this re-use permits the use of
`CMAKE_DEBUG_POSTFIX` to have the import library and the DLL be named
with the trailing suffix but have the same import name for the swift
module and interface.
2019-05-20 09:28:35 -07:00
Andrei Lebedev
368bcba28a FindPostgreSQL: Find debug lib, imported configs
* Add find_library calls for debug and release
* Set imported configs for corresponding libraries in imported target
* Set debug/optimized in PostgreSQL_LIBRARIES

Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
2019-05-20 11:29:04 -04:00
Robert Maynard
3205c7c950 cmNinjaLinkLineDeviceComputer now lives in the correct source file 2019-05-20 11:05:16 -04:00
Brad King
e025495b85 Merge topic 'makefiles_additional_clean_files'
f945c3e755 Tests: Extend MakeClean test to cover subdirectories without targets
1ded3599d6 Makefiles: Process ADDTIONAL_CLEAN_FILES dir prop at directory level
827da1119e Makefiles: Make build root targets "all", "clean" and "preinstall" recursive
adc3459707 Makefiles: Avoid pointer repurposing
0d41b45cc9 Makefiles: Inline range loop range arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3338
2019-05-20 10:56:22 -04:00
Brad King
a9fb9a8774 Merge topic 'ninja-swift'
a9180ccf9a Tests: add a check for the Swift compiler
d745551fb6 Help: add some initial documentation for Swift support
9a182c9e5b Auxiliary: update vim syntax highlighting
e9b0063e8e Modules: add build rules for Swift Ninja support
b6412e3e38 Ninja: add placeholders to support Swift build
7d7f31161d Ninja: add support for Swift's output-file-map.json
d688c4c19d Swift: remove unnecessary unreleased Ninja infrastructure
0723582208 Swift: Detect compiler version
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3297
2019-05-20 10:55:27 -04:00
Brad King
28ee311490 Merge topic 'FindPNG-static-define'
21c74faa1a FindPNG: Fix definitions on imported target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Paolo Lammens <lammenspaolo@gmail.com>
Merge-request: !3337
2019-05-20 10:04:00 -04:00
Brad King
9860b4c5e8 Merge topic 'interface-library-export-properties'
73a829e078 InterfaceLibrary: Whitelist EXPORT_PROPERTIES property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3336
2019-05-20 10:02:57 -04:00
Eike Ziller
13c92b4a30 Ninja: Fix creation of library symlinks in folders with spaces
The arguments to 'cmake -E cmake_symlink_library' must be properly
quoted.
2019-05-20 14:36:42 +02:00
Kitware Robot
96cf96d4eb CMake Nightly Date Stamp 2019-05-20 00:01:04 -04:00
Vitaly Stakhovsky
273257222e Source: change parameters to std::string 2019-05-19 10:33:26 -04:00
Kitware Robot
7024fe33b8 CMake Nightly Date Stamp 2019-05-19 00:01:06 -04:00
Craig Scott
dec5693641 Merge topic 'bracket-comment-doc-clarification'
124564504a Help: Clarify that bracket comments start with bracket open

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Acked-by: Ben McMorran <ben.mcmorran@gmail.com>
Merge-request: !3331
2019-05-18 19:24:55 -04:00