Commit Graph
28539 Commits
Author SHA1 Message Date
Saleem Abdulrasool 689be6235e Generator: support per-language link library flag
This enables the use of MSVC and Swift on Windows in a single project.
MSVC uses no flag to indicate linked libraries while Swift uses `-l`.
Add support for a language specific link library flag which takes
precedence over the global `CMAKE_LINK_LIBRARY_FLAG` which preserves
compatibility with earlier releases.
2019-08-09 08:16:29 -07:00
Kyle Edwards d4d5053c30 Refactor: Finish replacing CMAKE_BUILD_WITH_CMAKE with CMAKE_BOOTSTRAP
Remove -DCMAKE_BUILD_WITH_CMAKE from Source/CMakeLists.txt. Remove
CMAKE_BOOTSTRAP from bootstrap's cmConfigure.h. Add -DCMAKE_BOOTSTRAP
to all bootstrap sources, and remove the Unix specialization of
CMAKE_BOOTSTRAP in libuv (a review of the libuv code suggests that
this will not have an effect on the Windows build.)
2019-08-09 10:42:02 -04:00
Kitware Robot 54e9d38c28 Refactor: Convert all instances of CMAKE_BUILD_WITH_CMAKE to CMAKE_BOOTSTRAP 2019-08-09 10:41:44 -04:00
Brad King 1996e01578 Merge topic 'cmFileCommand-refactoring'
a7a5f376bc cmFileCommand: Use cmSubcommandTable
b66b7464ab Introduce cmSubcommandTable
2b785875fb cmFileCommand: turn into free function
9703c65718 cmFileCommand: put subcommands in unnamed namespace
64f987c174 cmFileCommand: port to cmExecutionStatus

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3657
2019-08-09 10:39:36 -04:00
Brad King 1263b0884b Merge topic 'cmDefinitions_cleanups'
1a47d368d8 cmDefinitions: Cleanups and optimizations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3666
2019-08-09 10:37:25 -04:00
Brad King 7891f69c67 Merge topic 'autogen_cmStrCat'
ca2923110c Autogen: Modernize to use cmStrCat for string concatenation
d02a99d9d3 Autogen: Modernize code to use cm::string_view for the info writer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3663
2019-08-09 10:33:00 -04:00
Brad King 8bd5e5f181 Merge topic 'execution-status'
5558070d52 cmExecutionStatus: Remove function Clear

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3654
2019-08-09 10:26:33 -04:00
Sebastian Holtermann 27090096ef cmStringAlgorithms: Add cmRemoveQuotes
- Add `cmRemoveQuotes` function to cmStringAlgorithms
- Remove unused removeQuotes inline functions
2019-08-09 12:20:50 +02:00
Regina Pfeifer 62659100aa cmLocalGenerator: Use cmStrCat
Grep for '[A-Z]_";' to find places that could benefit from cmStrCat.
2019-08-09 10:58:00 +02:00
Kitware Robot 242435a9c8 CMake Nightly Date Stamp 2019-08-09 00:01:06 -04:00
Kasper Laudrup 6bc77966ad Retry removing directories on Windows
On Windows removing a directory can fail if other processes have a
handle to it. This has been "solved" with a retry hack when moving
directories, so use the same hack when removing directories.
2019-08-08 15:59:02 +02:00
Kasper Laudrup 5729580376 Use registry setting for removal retry count and delay
Instead of hardcoding the amount of retries and the time to sleep
between them when removing directories on Windows, use the setting
potentially present in the registry instead. This setting is already
used when retrying moving directories.
2019-08-08 15:59:02 +02:00
Sebastian Holtermann 1a47d368d8 cmDefinitions: Cleanups and optimizations
In cmDefinitions:
- sort methods in source code by static or not static
- use `std::unordered_set<cm::string_view>` instead of `std::set<std::string>`
  for duplications tests.
2019-08-08 14:12:43 +02:00
Kitware Robot 38a5b0203f CMake Nightly Date Stamp 2019-08-08 00:01:08 -04:00
Sebastian Holtermann ca2923110c Autogen: Modernize to use cmStrCat for string concatenation 2019-08-07 19:48:02 +02:00
Brad King 40bbe50e23 CMake 3.15.2 2019-08-07 12:44:19 -04:00
Sebastian Holtermann d02a99d9d3 Autogen: Modernize code to use cm::string_view for the info writer 2019-08-07 18:01:32 +02:00
Brad King bbf4a5771f Merge topic 'tidy_inefficient_string'
18b0330b86 clang-tidy: Enable performance-inefficient-string-concatenation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3648
2019-08-07 11:54:53 -04:00
Brad King ddb1759b3e Merge topic 'cmStringAlgorithms_move_functions'
959b97a27f Tests: testStringAlgorithms: Add cmTrimWhitespace, cmEscapeQuotes, cmTokenize
7fbcc16dcd cmStringAlgorithms: cmIsSpace, cmTrimWhitespace, cmEscapeQuotes, cmTokenize

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3647
2019-08-07 11:47:54 -04:00
Brad King ce14f6c677 Merge topic 'find_package-prefer-config-not-found'
8ed868606d find_package: Fix prefer-config mode to not fail on missing optional package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3653
2019-08-07 09:57:35 -04:00
Regina Pfeifer 9ba0bf60c6 cmA*Command: Turn into free functions
Ref: #19499
2019-08-07 10:16:32 +02:00
Kitware Robot e295290ed7 CMake Nightly Date Stamp 2019-08-07 00:01:08 -04:00
Robert Maynard a233e4e7d9 CUDA: Compilers can now state they don't require a device linking step 2019-08-06 15:44:15 -04:00
Regina Pfeifer a7a5f376bc cmFileCommand: Use cmSubcommandTable 2019-08-06 17:21:52 +02:00
Regina Pfeifer b66b7464ab Introduce cmSubcommandTable 2019-08-06 17:21:52 +02:00
Robert Maynard 8f1d22c2d9 CUDA: Support CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS global variable 2019-08-06 09:55:40 -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
Regina Pfeifer 2b785875fb cmFileCommand: turn into free function 2019-08-06 12:25:12 +02:00
Daniel Pfeifer 9703c65718 cmFileCommand: put subcommands in unnamed namespace 2019-08-06 12:21:04 +02:00
Daniel Pfeifer 64f987c174 cmFileCommand: port to cmExecutionStatus 2019-08-06 11:42:25 +02:00
Regina Pfeifer 5558070d52 cmExecutionStatus: Remove function Clear 2019-08-06 10:05:27 +02:00
Kitware Robot 53fc083d37 CMake Nightly Date Stamp 2019-08-06 00:01:07 -04:00
Sebastian Holtermann 18b0330b86 clang-tidy: Enable performance-inefficient-string-concatenation
Enables the clang-tidy test performance-inefficient-string-concatenation
and replaces all inefficient string concatenations with `cmStrCat`.

Closes: #19555
2019-08-05 17:21:00 +02:00
Brad King 2327cc0e05 Merge topic 'control-block3'
41364824ad cmFunctionBlocker: Recycle functions
6491270e0d cmFunctionBlocker: Move check for matching args
af24e4ef6e cmFunctionBlocker: Move common logic to base
ef38ff22f7 cm*FunctionBlocker: Extract function Replay
b51fba6298 cmMakefile: Add OnExecuteCommand callback
c76500949d cm*FunctionBlocker: Move to source file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3632
2019-08-05 10:42:50 -04:00
Brad King c969d4628b Merge topic 'cleanup_cmake_constructor'
0962589627 cmake: Initialize booleans at declaration and cleanup constructor

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3646
2019-08-05 10:40:46 -04:00
Brad King e0f735f8f5 Merge topic 'shared-deps-no-iface'
d75cad01f0 Fix rpath-link for shared lib with only private deps
4b2e1fc9ee cmGeneratorTarget: Use local var to de-duplicate CMP0022 checks
94648953be cmLinkItem: Simplify tracking of whether link interface is explicit

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3642
2019-08-05 10:37:47 -04:00
Brad King 26a3bccb60 Merge topic 'link-library-file-flag'
f6d6dbc293 Make CMAKE_LINK_LIBRARY_FILE_FLAG work like CMAKE_LINK_LIBRARY_FLAG

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3641
2019-08-05 10:31:18 -04:00
Brad King 7eb2fd6ca6 Merge topic 'fileapi-install-generators'
d70a0f8681 fileapi: Fix codemodel target install destination for cross-dir rules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3639
2019-08-05 10:20:27 -04:00
Sebastian Holtermann 7fbcc16dcd cmStringAlgorithms: cmIsSpace, cmTrimWhitespace, cmEscapeQuotes, cmTokenize
This adds the following functions to `cmStringAlgorithms`:

- `cmIsSpace`
- `cmTrimWhitespace` (moved from `cmSystemTools::TrimWhitespace`)
- `cmEscapeQuotes` (moved from `cmSystemTools::EscapeQuotes`)
- `cmTokenize` (moved from `cmSystemTools::tokenize` and adapted to
  accept `cm::string_view`)
2019-08-05 11:25:30 +02:00
Kitware Robot 3ebd3fa51d CMake Nightly Date Stamp 2019-08-05 00:01:06 -04:00
Kitware Robot 18a0d47bec CMake Nightly Date Stamp 2019-08-04 00:01:07 -04:00
Sebastian Holtermann 0962589627 cmake: Initialize booleans at declaration and cleanup constructor 2019-08-03 11:44:38 +02:00
Kitware Robot 2a5d077a89 CMake Nightly Date Stamp 2019-08-03 00:01:09 -04:00
Brad King d75cad01f0 Fix rpath-link for shared lib with only private deps
Under CMP0022 NEW behavior, the link interface is explicit even if there
are no public dependencies (`INTERFACE_LINK_LIBRARIES` is not set).
Mark it as such to activate our tracking of private runtime dependencies
of shared libraries for generation of `-rpath-link` flags.

Fixes: #19556
2019-08-02 14:50:57 -04:00
Brad King 4b2e1fc9ee cmGeneratorTarget: Use local var to de-duplicate CMP0022 checks 2019-08-02 14:48:34 -04:00
Brad King 94648953be cmLinkItem: Simplify tracking of whether link interface is explicit
We now only need a boolean.
2019-08-02 14:43:16 -04:00
Brad King f6d6dbc293 Make CMAKE_LINK_LIBRARY_FILE_FLAG work like CMAKE_LINK_LIBRARY_FLAG
The `CMAKE_LINK_LIBRARY_FILE_FLAG` variable is meant for linkers that
want library file paths to be preceded by a flag.  This is used only
for OpenWatcom to add the `library` argument before library file paths.
Refactor the approach to treat `CMAKE_LINK_LIBRARY_FILE_FLAG` as a
command-line string fragment to add just before the library file path.
This has two advantages:

* `CMAKE_LINK_LIBRARY_FILE_FLAG` now works like `CMAKE_LINK_LIBRARY_FLAG`.
* `CMAKE_LINK_LIBRARY_FILE_FLAG` can now be an attached flag whose value
  is the library file path.

Technically this is a change in behavior, but this setting was created
for internal use and should be rarely used outside of CMake itself.

Fixes: #19541
2019-08-02 13:37:39 -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 7bacf0233b Merge topic 'use_cmHasPrefix'
a693e875db Cleanups: Use cmHas{Prefix,Suffix} instead of String{Starts,Ends}With

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3637
2019-08-02 10:56:59 -04:00