Commit Graph

50071 Commits

Author SHA1 Message Date
Brad King dd0743fdf8 Merge topic 'ci-tweaks'
e80362252f ci: support a max parallelism for tests
93a745683b sccache: use a different port for CMake builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5287
2020-09-28 11:29:40 -04:00
Ben Boeckel e80362252f ci: support a max parallelism for tests
Machines may have more cores than testing actually supports.
2020-09-28 09:57:24 -04:00
Ben Boeckel 93a745683b sccache: use a different port for CMake builds
This avoids server reuse between different projects on the same machine.
2020-09-28 09:55:42 -04:00
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
Kyle Edwards d6c051c126 Tests: Add some basic configure tests for the CMake GUI 2020-09-28 09:46:35 -04:00
Kyle Edwards 7cd95d9996 Tests: Add CatchShow helper for CMake GUI tests 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
Brad King 1b03ac7da7 Merge topic 'ci-cxx11'
a258283160 ci: convert one build to cover strict C++11 usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5285
2020-09-28 09:39:53 -04:00
Brad King a258283160 ci: convert one build to cover strict C++11 usage
Without this, we do not cover compilation with only C++11 until nightly
testing, at which point many builds require it, and failures block
merging anything that was staged.
2020-09-28 09:23:31 -04:00
Robert Maynard 90dead024c CheckCompilerFlag: unified way to check compiler flags per language 2020-09-28 09:07:54 -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 20bd9c2674 Merge topic 'vs-generator-platform-install-prefix'
561d4b4a47 VS: Fix CMAKE_INSTALL_PREFIX with GENERATOR_PLATFORM for x64 and ARM

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5272
2020-09-28 08:44:48 -04:00
Brad King 9e0da9ea2b Merge topic 'pkg_config_detailed_error'
ab8bd48352 FindPkgConfig: Search for pkg-config.bat file on a Windows host
3201dd521e FindPkgConfig: Show more info when pkg-config --version fails

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5273
2020-09-28 08:44:09 -04:00
Brad King c442c59757 Merge topic 'xcode-restore-ios-tests'
2092ab08fe xcode: conditionally enable combined install tests
62ce9e16e0 xcode: annotate test output with selected SDK

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5271
2020-09-28 08:41:47 -04:00
Brad King 7fcd5d75f2 Merge topic 'FPHSA-fix-spurious-error'
1e82b1c4bc FPHSA: avoid spurious error if version variable is not defined

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5277
2020-09-28 08:41:02 -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
Brad King 99f92d55d6 Merge topic 'FindJNI-aarch64' into release-3.18
696d16ae6c FindJNI: Add aarch64 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vitaly Lipatov <lav@etersoft.ru>
Merge-request: !5275
2020-09-28 08:38:54 -04:00
Brad King b050fe532f Merge branch 'release-3.18' 2020-09-28 08:38:54 -04:00
Brad King c47293fe9f Merge topic 'FindJNI-aarch64'
696d16ae6c FindJNI: Add aarch64 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vitaly Lipatov <lav@etersoft.ru>
Merge-request: !5275
2020-09-28 08:38: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
Betsy McPhail 9b988d9e57 Help: Cleanup guides
* Move sections to be same level as Introduction in "Using Dependecies"
* Rename "Importing Exporting Targets" to "Importing Exporting Guide"
* Add an Introduction header to the Tutorial and Importing Exporting Guide
2020-09-25 15:29:05 -04:00
Betsy McPhail 0aea38d25e Help: Change User Interaction image paths to be relative to source file 2020-09-25 14:45:01 -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
Marc Chevrier 1e82b1c4bc FPHSA: avoid spurious error if version variable is not defined
Fixes: #21241
2020-09-25 19:35:11 +02:00
Rechi 561d4b4a47 VS: Fix CMAKE_INSTALL_PREFIX with GENERATOR_PLATFORM for x64 and ARM
Generate the same default `CMAKE_INSTALL_PREFIX` if a project is
configured with CMAKE_GENERATOR_PLATFORM (`cmake -G "Visual Studio
[...]" -A x64` and `cmake -G "Visual Studio [...]" -A ARM`) instead of
the prior CMake 3.1 way (`cmake -G "Visual Studio [...] Win64"` and
`cmake -G "Visual Studio [...] ARM"`).
2020-09-25 13:11:14 -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
Brad King c6c90b4207 Merge topic 'clang-llvm-lib' into release-3.18
f5d3da091b Clang: Look for llvm-lib when using MSVC-like front-end

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Thomas Bernard <thomas@famillebernardgouriou.fr>
Merge-request: !5264
2020-09-25 12:23:02 -04:00
Brad King ef26161bae Merge branch 'release-3.18' 2020-09-25 12:23:02 -04:00
Brad King 0453342cda Merge topic 'clang-llvm-lib'
f5d3da091b Clang: Look for llvm-lib when using MSVC-like front-end

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Thomas Bernard <thomas@famillebernardgouriou.fr>
Merge-request: !5264
2020-09-25 12:23:02 -04:00
Brad King 627fb15eaa Merge topic 'linux-_FILE_OFFSET_BITS-64'
5b10f96793 Linux: Compile with _FILE_OFFSET_BITS=64 on 32-bit Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Marc Chevrier <marc.chevrier@gmail.com>
Merge-request: !5258
2020-09-25 12:21:07 -04:00
Brad King 696d16ae6c FindJNI: Add aarch64 support
Extend the fix from commit 44dffbcc94 (FindJNI: Add arm64 support,
2020-08-25, v3.18.3~21^2) to cover the `aarch64` name too.

Fixes: #21237
2020-09-25 12:04:34 -04:00
Elad Lahav f9e950d4c5 libuv: Add support for building for QNX within CMake 2020-09-25 11:53:44 -04:00
Alexandru Croitor ab8bd48352 FindPkgConfig: Search for pkg-config.bat file on a Windows host
The strawberry perl distribution ships a pkg-config file and a
pkg-config.bat file.

find_program() does not usually look for a .bat file program unless
explicitly specified in the NAMES argument. This would cause
CMake to find the non-bat file, and executing that with
execute_process() leads to a
'%1 is not a valid Win32 application' error.

Prefer to search for pkg-config.bat file when on a Windows host, in
additiona to the regular pkg-config file.

Fixes: #21239
2020-09-25 15:56:05 +02:00
Alexandru Croitor 3201dd521e FindPkgConfig: Show more info when pkg-config --version fails
Fixes: #21239
2020-09-25 15:49:18 +02:00
Gregor Jasny 2092ab08fe xcode: conditionally enable combined install tests
The new Xcode 12 build system does not support recursive
invocation. Therefore lazily triggered builds for the
corresponding platform which run during the `install` target
fail with:

```
error: unable to attach DB: error: accessing build database
```

While looking for a work-around we conditionally disable those
tests.

Issue: #21206
2020-09-25 09:38:30 +02:00
Gregor Jasny 62ce9e16e0 xcode: annotate test output with selected SDK 2020-09-25 09:30:17 +02:00
Kitware Robot 0cd1ef0932 CMake Nightly Date Stamp 2020-09-25 00:01:17 -04:00
Shoaib Meenai f5d3da091b Clang: Look for llvm-lib when using MSVC-like front-end
In commit 55196a1440 (MSVC: Use 'lib' instead of 'link /lib' to create
static libraries, 2020-01-10, v3.18.0-rc1~625^2) we changed CMake to use
lib instead of `link /lib` to create static libraries, but it didn't
search for `llvm-lib`. If you have `llvm-lib` but not `lib` (e.g. when
cross-compiling), when `CMakeFindBinutils` is invoked for the `C` and
`CXX` languages, `CMAKE_AR` is not found. When it's subsequently invoked
for the ASM language, `CMAKE_ASM_SIMULATE_ID` and
`CMAKE_ASM_COMPILER_FRONTEND_VARIANT` are not set (because
`CMakeDetermineASMCompiler` doesn't call `CMAKE_DETERMINE_COMPILER_ID`,
which sets those variables), so we go down the non-MSVC conditional and
set `CMAKE_AR` to a GNU-style `ar`, which of course does not understand
lib flags. Explicitly search for `llvm-lib` to avoid this situation.
2020-09-24 15:37:24 -04:00