Commit Graph

29622 Commits

Author SHA1 Message Date
Brad King 07c1bdda3d cmMakefile: Replace GetExecutionFilePath with the top of the Backtrace
The execution file path stack and the backtrace stack are kept in sync.
At all call sites of `GetExecutionFilePath`, the execution file path
matches the path in the context at the top of the backtrace stack.
2020-09-28 09:49:08 -04:00
Brad King 727ed0c403 cmMakefile: Simplify ExpandArguments signature
The only call sites that pass the explicit file name argument are in
function blocker `ArgumentsMatch` methods for `function` and `macro`.
We already ensure that they are balanced within a file scope, and the
RAII helpers `BuildsystemFileScope` and `ListFileScope` ensure that the
backtrace and execution list file stacks unwind to the matching level.
Therefore we can assume that the file name where we are checking for
matching arguments matches starting file name where those arguments
first appeared, and do not need to pass it explicitly.
2020-09-28 09:49:08 -04:00
Brad King e456dae669 cmConditionEvaluator: Remove extra copy of execution context
The execution context passed to the constructor always matches the top
of the backtrace, so the former can be removed in favor of using only
the latter.
2020-09-28 09:49:08 -04:00
Brad King 0100a4943e cmMakefile: Remove now-unused overload of GetBacktrace 2020-09-28 09:49:08 -04:00
Brad King dc49abcb89 if,while: Clarify condition backtrace construction
Evaluation of the `elseif`, `else`, and `while` commands takes place
during function blocker evaluation before any actual command execution
takes place.  Therefore they do not have an entry in the backtrace
stack.  Each of their implementations needs to construct an extra
backtrace entry to use in error messages and such.  Each of them used a
slightly different approach due to evolution over time.  Clean up their
construction of the extra backtrace entry and use a named variable to
contain it for clarity.
2020-09-28 09:49:08 -04:00
Brad King 68af831505 cmMakefile: Inline GetExecutionContext at call sites
The method only had one line, and its implementation is more clear
at the call sites than the method name.
2020-09-28 09:49:07 -04:00
Brad King 280f3918f3 cmMakefile: Simplify GetExecutionContext implementation
This method takes the function name and line from the top of the
current backtrace and then gets the file path from the state's
`GetExecutionListFile`.  This exactly matches what the `cmMakefileCall`
constructor does to create the top of the current backtrace anyway,
so we can just take that directly.
2020-09-28 09:49:07 -04:00
Kyle Edwards 85f5009d27 CMake GUI: Add environment editor 2020-09-28 09:46:35 -04:00
Brad King 0e59b45dfc cmListFileCache: Add explicit constructors
In order to construct with an initializer list in pure C++11, add
the explicit constructors.
2020-09-28 09:46:34 -04:00
Kyle Edwards 071755c3ef Merge topic 'cmake-gui-slot-connections'
ab8f6fdd8c CMake GUI: Modernize signal-slot connections

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5278
2020-09-28 09:01:47 -04:00
Brad King 13e0a0d74e Merge topic 'libuv-qnx'
f9e950d4c5 libuv: Add support for building for QNX within CMake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5200
2020-09-28 08:39:54 -04:00
Kitware Robot 97626b1dec CMake Nightly Date Stamp 2020-09-28 00:01:22 -04:00
Kyle Edwards ab8f6fdd8c CMake GUI: Modernize signal-slot connections
Qt5 supports passing function pointers to QObject::connect(), and
prefers this over SIGNAL() and SLOT(). Modernize the connections,
stop using a deprecated signal from QComboBox, and modernize a few
QKeySequence's.
2020-09-27 12:06:54 -04:00
Kitware Robot 558ce94016 CMake Nightly Date Stamp 2020-09-27 00:01:10 -04:00
Kitware Robot f68a21dc5c CMake Nightly Date Stamp 2020-09-26 00:01:12 -04:00
Robert Maynard b6418155f3 cmGeneratorTarget: Include Cache now occurs per language+config
Previously only occurred per config which broke per-language
system includes.
2020-09-25 14:00:06 -04:00
Brad King 7a4d84d8d2 Merge topic 'find_package_module_mode_print_debug_message'
b423a20ce1 FindPackage: Provide better debug message when <PKG_FOUND> is false
a7acafc977 FindPackage: find_package(MODULE) respects CMAKE_FIND_DEBUG_MODE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5256
2020-09-25 12:26:10 -04:00
Brad King f0592b3497 Merge topic 'cuda_clang_separable'
c63fe01835 CUDA: Clang separable compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5221
2020-09-25 12:25:30 -04:00
Brad King 7b4861b082 Merge topic 'xcode-12-new-build-system'
0a67c3ebe1 Xcode: Remove dependency Makefile hacks under the "new build system"
c6c7f6fbeb Xcode: Remove remnants of ancient XCODE_DEPEND_HELPER utility target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5267
2020-09-25 12:23:48 -04:00
Elad Lahav f9e950d4c5 libuv: Add support for building for QNX within CMake 2020-09-25 11:53:44 -04:00
Kitware Robot 0cd1ef0932 CMake Nightly Date Stamp 2020-09-25 00:01:17 -04:00
Raul Tambre c63fe01835 CUDA: Clang separable compilation
For NVCC the compiler takes care of device linking when passed the "-dlink"
flag.
Clang doesn't support such magic and requires the buildsystem to do the work
that NVCC does behind the scenes.

The implementation is based on Bazel's device linking documentation:
https://github.com/tensorflow/tensorflow/blob/7cabcdf073abad8c46e9dda62bb8fa4682d2061e/third_party/nccl/build_defs.bzl.tpl#L259

Closes: #20726
2020-09-24 15:19:54 -04:00
Brad King 0ff74958f4 Merge topic 'cmake-gui-tests'
1dcc569828 gitlab-ci: Add GUI testing to each OS
4c6e5cd0fa Tests: Add some basic tests for CMake GUI
41e223deb3 CMake GUI: Split up into libraries, add test shim
b7995b62f0 QCMakeCacheView: Default to nullptr for parent

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5224
2020-09-24 15:15:19 -04:00
Brad King 9aa93937f9 Merge topic 'obj-lib-per-config-source'
2f76e7429b OBJECT libraries: Properly recognize if sources depend on configuration
d575ecc9de cmGeneratorTarget: Better name for internal variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5252
2020-09-24 15:10:04 -04:00
Brad King 0a67c3ebe1 Xcode: Remove dependency Makefile hacks under the "new build system"
The original Xcode build system did not properly re-link targets that consumed
object libraies.  We worked around that with a post-build command on the object
libraries themselves that removed their consumers if out of date.  The "new
build system" does not appear to need such help, so drop the workaround.
2020-09-24 14:53:28 -04:00
Brad King c6c7f6fbeb Xcode: Remove remnants of ancient XCODE_DEPEND_HELPER utility target
The target has not been generated since commit d92d51429e (BUG: fix for bug
6193, fix xcode depend helper, 2008-01-10, v2.6.0~553).  Remove it from
the list of special targets.
2020-09-24 14:53:22 -04:00
Craig Scott ac5195c408 Merge topic 'find_package-version-range'
5b3356263c CMakePackageConfigHelpers: Add version range support
6bfc442fde FPHSA: add support of version range
d7df81067b find_package: Add support of version range
09095dbcd2 cmFindPackageCommand: Refactoring

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Michael Hirsch, Ph.D. <michael@scivision.dev>
Merge-request: !5226
2020-09-24 07:29:03 -04:00
Kitware Robot d18c564210 CMake Nightly Date Stamp 2020-09-24 00:01:12 -04:00
Kyle Edwards 41e223deb3 CMake GUI: Split up into libraries, add test shim 2020-09-23 14:10:40 -04:00
Kyle Edwards b7995b62f0 QCMakeCacheView: Default to nullptr for parent 2020-09-23 14:10:40 -04:00
Brad King d827fdb6f9 Merge topic 'separate_arguments-program'
d832c1cc7d separate_arguments: add option PROGRAM
f4c21d4953 separate_arguments: refactoring

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5253
2020-09-23 12:05:26 -04:00
Brad King 869d6c82a0 Merge topic 'install-EXPORT-source-CONFIG'
bf114602da install(EXPORT): Fix exporting target w/ source named using CONFIG genex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5240
2020-09-23 11:58:02 -04:00
Brad King 145730c746 Merge topic 'binary-dir-props'
f2daa025e3 {get,set}_property: Add support for referencing binary directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5254
2020-09-23 10:22:56 -04:00
Deniz Bahadir 2f76e7429b OBJECT libraries: Properly recognize if sources depend on configuration
Fixes: #21198
2020-09-23 10:05:55 -04:00
Brad King f2daa025e3 {get,set}_property: Add support for referencing binary directories
Index directories by their binary directory path in addition to their
source directory path.

Fixes: #19262
2020-09-23 09:25:42 -04:00
Marc Chevier d7df81067b find_package: Add support of version range
This enhancement is the first step for solving issue #21107
2020-09-23 12:52:25 +02:00
Marc Chevrier 09095dbcd2 cmFindPackageCommand: Refactoring
* Use member initialisation at declaration
* AddFindDefinition: same signature as cmMakefile::AddDefinition for consistency
* Factorise version variables creation
2020-09-23 12:52:25 +02:00
Kitware Robot 03b3b5ab4b CMake Nightly Date Stamp 2020-09-23 00:01:20 -04:00
Robert Maynard b423a20ce1 FindPackage: Provide better debug message when <PKG_FOUND> is false 2020-09-22 15:32:31 -04:00
Robert Maynard a7acafc977 FindPackage: find_package(MODULE) respects CMAKE_FIND_DEBUG_MODE
Fixes #21216
2020-09-22 14:13:48 -04:00
Marc Chevrier d832c1cc7d separate_arguments: add option PROGRAM
Fixes: #21217
2020-09-22 16:32:34 +02:00
Marc Chevrier f4c21d4953 separate_arguments: refactoring 2020-09-22 16:32:34 +02:00
Deniz Bahadir d575ecc9de cmGeneratorTarget: Better name for internal variable 2020-09-22 14:00:03 +02:00
Brad King 966c3263c2 Merge topic 'file-ARCHIVE-compression-level'
195d14e781 file(ARCHIVE_CREATE): Add option to control compression level

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Merge-request: !5242
2020-09-22 07:43:31 -04:00
Deniz Bahadir bf114602da install(EXPORT): Fix exporting target w/ source named using CONFIG genex
Fixes: #21203
2020-09-22 07:35:02 -04:00
Kitware Robot 97ff10d337 CMake Nightly Date Stamp 2020-09-22 00:01:28 -04:00
Asit Dhal 195d14e781 file(ARCHIVE_CREATE): Add option to control compression level
Fixes: #21125
2020-09-21 13:08:11 -04:00
Brad King 64901e053b Merge topic 'xcode-12-new-build-system'
b8ecd4df5f ExternalProject: Use CMP0114 NEW behavior with Xcode "new build system"
fe258f6382 Tests: Skip RunCMake.XcodeProject device cases for Xcode "new build system"
1c3d2d0951 Tests: Skip Qt*Autogen.MocSkipSource case for Xcode "new build system"
542884e527 Tests: Update RunCMake.XcodeProject cases for Xcode "new build system"
832a78be2d Tests: Update BuildDepends test for Xcode "new build system"
ff76c51ec3 Tests: Update RunCMake.file case with workaround for Xcode "new build system"
1806cdd17c Tests: Avoid duplicate custom commands for Xcode "new build system"
8d5f4c4db9 Xcode: Switch to the "new build system" for Xcode 12 and above
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5229
2020-09-21 09:10:48 -04:00
Brad King ca5e309940 Merge topic 'foreach-int-parse-range-check'
0412b55b83 foreach: Fix crash parsing integer out of range

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5239
2020-09-21 08:55:29 -04:00
Kitware Robot 4abf0747fc CMake Nightly Date Stamp 2020-09-21 00:01:28 -04:00