Commit Graph

49918 Commits

Author SHA1 Message Date
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
Brad King
0cb7216b9f Merge branch 'release-3.18' into master 2020-09-22 09:56:56 -04:00
Brad King
177fc02073 CMake 3.18.3 v3.18.3 2020-09-22 08:53:09 -04:00
Brad King
44c5f5d4ec Merge topic 'cmake_path-updates'
82c9508313 cmake_path: enhancements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5245
2020-09-22 08:03:51 -04:00
Brad King
2c896c381b Merge topic 'comp-ti-std-options'
6a66bb13ed Compiler/TI: Add std options for C++14
fe9cddf181 Compiler/TI: Add std options for C++98
55fc045aa8 Compiler/TI: Add std options for C11
2e69993101 Compiler/TI: Check default C standard
8300030f71 Compiler/TI: Check compiler version for C99 support
0b4582f229 Compiler/TI: Fix definition of std options
a70df0d6f0 Compiler/TI: Avoid generic variable name in macro

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5249
2020-09-22 07:48:24 -04: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
Brad King
674d394515 Merge topic 'findthreads_missing_prototype'
6ef64013ba FindThreads: Add missing static keyword in pthread test code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Rolf Eike Beer <eike@sf-mail.de>
Merge-request: !5241
2020-09-22 07:42:39 -04:00
Brad King
e138d21ef2 Merge topic 'FindGLEW-platform'
d628ac0eb8 FindGLEW: Avoid using CMAKE_GENERATOR_PLATFORM to detect platform

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5244
2020-09-22 07:41:34 -04:00
Brad King
cedc0a0329 Merge topic 'findcudatoolkit_cross_scattered'
9d3f7872e1 FindCUDAToolkit: Support scattered installations when crosscompiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5247
2020-09-22 07:40:34 -04:00
Brad King
13a326536b Merge branch 'release-3.17' into master 2020-09-22 07:39:11 -04:00
Brad King
c20c523c71 Merge branch 'release-3.18' 2020-09-22 07:38:18 -04:00
Brad King
0b95e6164e Merge topic 'check-compiler-flag-result' into release-3.18
d4390c13e9 Merge branch 'backport-3.17-check-compiler-flag-result'
d46590910c Check*CompilerFlag: Do not set result as a normal variable too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alexander Grund <github@grundis.de>
Merge-request: !5250
2020-09-22 07:38:17 -04:00
Brad King
239b5e7b42 Merge topic 'check-compiler-flag-result'
d4390c13e9 Merge branch 'backport-3.17-check-compiler-flag-result'
d46590910c Check*CompilerFlag: Do not set result as a normal variable too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alexander Grund <github@grundis.de>
Merge-request: !5250
2020-09-22 07:38:17 -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
Asit Dhal
d628ac0eb8 FindGLEW: Avoid using CMAKE_GENERATOR_PLATFORM to detect platform
Use `CMAKE_SIZEOF_VOID_P` instead.

Fixes: #21128
2020-09-21 10:55:56 -04:00
Brad King
8e7e368cc6 Merge branch 'backport-3.17-check-compiler-flag-result' into release-3.17
Merge-request: !5250
2020-09-21 10:40:54 -04:00
Brad King
d4390c13e9 Merge branch 'backport-3.17-check-compiler-flag-result' 2020-09-21 10:37:56 -04:00
Brad King
d46590910c Check*CompilerFlag: Do not set result as a normal variable too
Refactoring in commit cb984c6627 (Check*CompilerFlag: Modernize modules,
2019-12-09, v3.17.0-rc1~320^2) accidentally left the result set as a
normal variable in addition to as a cache entry.  This is not specified
by the documentation, and is not the behavior in CMake 3.16 and below.

Fixes: #21207
2020-09-21 10:33:19 -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
c9bc062632 Merge topic 'foreach-int-parse-range-check' into release-3.18
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
Brad King
c622cfdfff Merge branch 'release-3.18' 2020-09-21 08:55:29 -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
Josef Angstenberger
6a66bb13ed Compiler/TI: Add std options for C++14
The TI compiler does either support C++98 or C++14,
but not both at the same time.
2020-09-21 00:57:20 +02:00
Josef Angstenberger
fe9cddf181 Compiler/TI: Add std options for C++98
The TI compiler does not support C++98, only C++03
(based on manual of current version).

This change sets the C++98 option to C++03 based on the fact that it
is done this way for the SunPro compiler already.
2020-09-21 00:57:20 +02:00
Josef Angstenberger
55fc045aa8 Compiler/TI: Add std options for C11 2020-09-21 00:57:20 +02:00
Josef Angstenberger
2e69993101 Compiler/TI: Check default C standard 2020-09-21 00:57:19 +02:00
Josef Angstenberger
8300030f71 Compiler/TI: Check compiler version for C99 support 2020-09-21 00:57:19 +02:00
Josef Angstenberger
0b4582f229 Compiler/TI: Fix definition of std options
- The compile option variable has to be defined as list.

- The compiler works in relaxed ANSI mode by default.
  Strict ANSI has to be explicitly set additionally to the
  language standard.
2020-09-21 00:57:18 +02:00
Josef Angstenberger
a70df0d6f0 Compiler/TI: Avoid generic variable name in macro
In commit a548a52230 (Compiler/TI: Refactor C/CXX to use a common file,
2020-07-11) a variable named `prefix` has been introduced.

It is set in the callers namespace because it was defined inside a
macro, not a function.

Avoid such generic variable name.
2020-09-21 00:57:18 +02:00
Raul Tambre
9d3f7872e1 FindCUDAToolkit: Support scattered installations when crosscompiling
Previously when CMAKE_CROSSCOMPILING was ON we'd end up not setting the target
directory if the non-scattered one didn't exist.
Fix this by assuming a scattered installation if the target directory isn't set
after the crosscompiling logic.

This is the same fix as commit 2c0d5d01ee (CUDA: Support scattered
installations when crosscompiling with Clang, 2020-09-14).
2020-09-20 17:35:12 +03:00
Marc Chevrier
82c9508313 cmake_path: enhancements
* Fix error on parsing "c:a" (root-name without root-directory)
* Enrich documentation
2020-09-20 15:17:34 +02:00
Kitware Robot
39a5c0c82c CMake Nightly Date Stamp 2020-09-20 00:01:12 -04:00
Kitware Robot
a37c0a543a CMake Nightly Date Stamp 2020-09-19 00:01:21 -04:00
Pavel Otchertsov
6ef64013ba FindThreads: Add missing static keyword in pthread test code
When CMAKE_C_FLAGS contains '-Werror -Wmissing-prototypes'
the pthread test code check fails with error:
"src.c:3:7: error: no previous prototype for 'test_func' [-Werror=missing-prototypes]".
Adding 'static' keyword to 'test_func' fixes it.
2020-09-18 23:24:56 +03:00
Brad King
b8ecd4df5f ExternalProject: Use CMP0114 NEW behavior with Xcode "new build system"
The ExternalProject module cannot be implemented in the Xcode "new build
system" without using CMP0114's NEW behavior.  When configuring for that
build system, warn if the policy is not set to NEW and use NEW behavior
anyway.
2020-09-18 13:46:45 -04:00
Brad King
fe258f6382 Tests: Skip RunCMake.XcodeProject device cases for Xcode "new build system"
The Xcode "new build system" selects different architectures for device
builds than the old build system does.  Skip those tests on Xcode 12+
pending further investigation.

Issue: #21206
2020-09-18 13:46:39 -04:00
Brad King
1c3d2d0951 Tests: Skip Qt*Autogen.MocSkipSource case for Xcode "new build system"
This test case enables AUTOMOC on the same sources in two separate targets.
This causes the `moc_*.cpp` generation custom commands to be added to multiple
`_autogen` targets, which is not allowed by the Xcode "new build system".
Skip the part of the test that triggers this problem for now.

Issue: #21205
2020-09-18 13:46:39 -04:00
Brad King
542884e527 Tests: Update RunCMake.XcodeProject cases for Xcode "new build system" 2020-09-18 13:02:20 -04:00
Brad King
832a78be2d Tests: Update BuildDepends test for Xcode "new build system"
Xcode somehow tracks what we're running inside a custom command,
so we cannot prevent it from regenerating the `noregen.h` header
even though we do not declare any dependencies of it.
2020-09-18 13:02:19 -04:00
Brad King
ff76c51ec3 Tests: Update RunCMake.file case with workaround for Xcode "new build system" 2020-09-18 13:02:19 -04:00
Brad King
1806cdd17c Tests: Avoid duplicate custom commands for Xcode "new build system" 2020-09-18 13:02:19 -04:00
Brad King
8d5f4c4db9 Xcode: Switch to the "new build system" for Xcode 12 and above
Provide an option to switch back to the original build system via
`-T buildsystem=1`.

Fixes: #18088
2020-09-18 13:02:14 -04:00
Brad King
2db623f554 Xcode: Add option to specify build system variant
Extend the `-T <toolset>` option to support a `buildsystem=` field with
the Xcode generator.  Add a `CMAKE_XCODE_BUILD_SYSTEM` variable to
inform project code about the selected build system variant.
2020-09-18 12:49:17 -04:00
Brad King
3ab18c870d Xcode: Factor out build phase variable declarations 2020-09-18 12:49:17 -04:00
Brad King
0d03717996 Xcode: Clarify name of legacy run script build phase helper 2020-09-18 12:49:17 -04:00
Brad King
5a15fcf597 Tests: Avoid duplicate custom commands in QtAutogen.AutogenOriginDependsOff 2020-09-18 12:49:09 -04:00
Ben McMorran
0412b55b83 foreach: Fix crash parsing integer out of range 2020-09-18 09:54:58 -04:00