Commit Graph

10931 Commits

Author SHA1 Message Date
Brad King
ae41216878 FindProtobuf: Link to threads dependency only when Protobuf is found
Since commit 03454b0d0d (FindProtobuf: Add missing link dependencies on
threads, 2018-10-31, v3.13.0-rc3~10^2) we add the threads library to the
list of libraries needed for Protobuf.  Update the logic to do this only
when a real protobuf library is actually found.

Fixes: #21161
2020-09-22 08:49:22 -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
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
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
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
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
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
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
bdd0e28782 Merge topic 'FindMatlab-r2020b'
4d292aecb6 FindMatlab: add R2020b => 9.9

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5233
2020-09-18 08:41:08 -04:00
Brad King
5e53b58c4a Merge topic 'finddoxygen-permission-denied'
818c6948da FindDoxygen: build the generated file contents using temporary strings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5230
2020-09-17 09:46:42 -04:00
Brad King
4be10a328a Merge topic 'findlibxml2_add_names'
fa258f175d FindLibXml2 : added libxml2_a to find_library()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5232
2020-09-17 09:45:50 -04:00
Brad King
56c80c8c6d Merge topic 'system-includes-for-clang-on-windows'
bb61c2d024 Clang: use -imsvc for system include dirs when running on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Acked-by: Thomas Bernard <thomas@famillebernardgouriou.fr>
Merge-request: !5231
2020-09-17 09:44:55 -04:00
Michael Hirsch
4d292aecb6 FindMatlab: add R2020b => 9.9 2020-09-17 08:58:21 -04:00
Olivier LIESS
fa258f175d FindLibXml2 : added libxml2_a to find_library()
This should match the default static library name defined by LibXml2 Makefile.msvc
2020-09-16 21:41:45 +02:00
Ronald Hiemstra
818c6948da FindDoxygen: build the generated file contents using temporary strings
Incrementally writing to a file, could result in write (permission
denied) errors.  Those errors are probably due to file-monitoring
processes having a temporary lock on a generated file.  The implemented
solution builds the content of the generated file as string and in the
end the built string is written to the generated file.

Fixes: #21190
2020-09-16 13:48:04 -04:00
Brad King
62c4c3c7f4 Merge topic 'flexiblas'
68349ae214 Find{BLAS,LAPACK}: Add support for FlexiBLAS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5225
2020-09-16 13:13:49 -04:00
Brad King
360d469395 Merge topic 'CMAKE_LINKER_points_to_lld_link_for_msvc_with_clang_gnu_interface'
013270ef09 Clang: Detect lld-link when using gnu front end with msvc target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5193
2020-09-16 13:12:44 -04:00
Andrew Fuller
bb61c2d024 Clang: use -imsvc for system include dirs when running on Windows
Fixes #17808
2020-09-16 10:06:46 -07:00
Brad King
b7590b8845 Merge topic 'ExternalProject-steps-refinement'
b4fc4da903 ExternalProject: Add policy CMP0114 to refine step target dependencies
f5791e24c6 Tests: Match RunCMake.ExternalProject NO_DEPENDS output more strictly
b637ef494c ExternalProject: Factor out an internal helper to add a step target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5215
2020-09-15 14:38:45 -04:00
Brad King
2d661d9ddd Merge topic 'cuda_clang_scattered_cross'
2c0d5d01ee CUDA: Support scattered installations when crosscompiling with Clang

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5222
2020-09-15 07:56:25 -04:00
Thomas Bernard
013270ef09 Clang: Detect lld-link when using gnu front end with msvc target
Fixes: #21137
2020-09-14 22:00:17 +02:00
Mattias Ellert
68349ae214 Find{BLAS,LAPACK}: Add support for FlexiBLAS
http://www.mpi-magdeburg.mpg.de/mpcsc/software/FlexiBLAS/
2020-09-14 21:40:33 +02:00
Brad King
b4fc4da903 ExternalProject: Add policy CMP0114 to refine step target dependencies
`ExternalProject_Add_StepTargets` and `INDEPENDENT_STEP_TARGETS` have
some limitations and lack some sanity checks.  They can cause confusing
build systems to be generated.  The basic problems are:

* The notion of step independence is attached to the step target
  rather than the step itself.

* The custom commands implementing the steps are duplicated in the
  step targets and the primary targets.  This can cause races.
  It is also incompatible with the Xcode "new build system".

Fix this by introducing policy CMP0114 to change the way step target
dependencies are handled.  Define independence from external
dependencies as a property of each individual step regardless of whether
there is a target for it.  Add dependencies among the primary target and
the step targets such that each custom command only appears in one
target.  When some steps are disconnected from the primary target, add
step targets for the steps commonly depended upon so that there is a
place to hold their custom commands uniquely.

Fixes: #18663
2020-09-14 10:48:16 -04:00
Kyle Edwards
b8fd97735b Merge topic 'findpython-docs-fixes'
b564ced24f FindPython: fix typo in Python_LIBRARY_DIRS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5220
2020-09-14 10:23:46 -04:00
Brad King
ce7e615fe8 Merge topic 'add_COMPILER_TARGET_for_all_clang_variants_on_windows'
cf83758b24 Clang: Implement CMAKE_${LANG}_COMPILER_TARGET for all variants on windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5192
2020-09-14 10:20:50 -04:00
Raul Tambre
2c0d5d01ee CUDA: Support scattered installations when crosscompiling with Clang
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.
2020-09-14 14:40:32 +03:00
Philipp Storz
b564ced24f FindPython: fix typo in Python_LIBRARY_DIRS
Fixes the wrong spelling of Python_LIBRARY_DIRS as
"Python_LIBRAY_DIRS" which exists in
  - FindPython
  - FindPython2
  - FindPython3
2020-09-11 20:35:34 +02:00
Thomas Bernard
cf83758b24 Clang: Implement CMAKE_${LANG}_COMPILER_TARGET for all variants on windows
Fixes: #21097
2020-09-11 09:05:03 -04:00
Brad King
907a3de1c4 Merge topic 'ispc_window_failures'
bf88a94d88 ISPC: CompilerLauncher tests work properly with x86 builds
8de145cae1 ISPC: DynamicLibrary test now passes on windows.
a83521e082 ISPC: Use the `obj` file extension for objects on windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5213
2020-09-11 08:31:13 -04:00
Brad King
8924b60f8d Merge topic 'armclang-fixes'
3d1ed986e2 ARMClang: Fix link line generation after addition of armlink support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Osama Moharam <osama.moharam.uw@renesas.com>
Merge-request: !5211
2020-09-11 08:30:33 -04:00
Brad King
b637ef494c ExternalProject: Factor out an internal helper to add a step target 2020-09-10 18:14:23 -04:00
Marc Chevrier
3d1ed986e2 ARMClang: Fix link line generation after addition of armlink support
Revise logic added by commit 73fb6ac82b (ARMClang: Add support for
armlink, 2020-06-02, v3.18.0-rc1~27^2).

Fixes: #21154
2020-09-10 16:33:14 -04:00
Brad King
48ed3bae58 Merge topic 'pch-instantiate-templates'
8c8f03422e PCH: Template instantiation support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Tested-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5168
2020-09-10 16:32:39 -04:00
Robert Maynard
a83521e082 ISPC: Use the obj file extension for objects on windows 2020-09-10 16:15:55 -04:00
Brad King
802584f0c2 Merge topic 'ios-pch-x-lang-header' into release-3.18
8d61294c3e PCH: Mark CMake PCH source files as -x <lang>-header

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5188
2020-09-09 11:23:34 -04:00
Brad King
6d77487eb7 Merge topic 'ios-pch-x-lang-header'
8d61294c3e PCH: Mark CMake PCH source files as -x <lang>-header

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5188
2020-09-09 11:23:34 -04:00
Brad King
8ec7edf563 Merge topic 'ExternalData-doc-typo'
1ad991a13e Help: correct typo in ExternalData (duplicate "of")

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5196
2020-09-08 15:45:41 -04:00
Brad King
d0ccc7cf2a Merge topic 'ispc_improvements'
a020787a9b ISPC: Support generation for multiple instruction sets
5a1750017e ISPC: Add compiler launcher support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5173
2020-09-08 11:19:28 -04:00