Commit Graph

8669 Commits

Author SHA1 Message Date
Brad King
388bf1feee Merge topic 'CheckIPOSupported-output-backslashes'
4e1ea02bb8 CheckIPOSupported: Tolerate backslashes in output of failed checks
b7dbb25a0a CheckIPOSupported: Simplify result reporting logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2331
2018-08-31 14:46:02 -04:00
Brad King
4e1ea02bb8 CheckIPOSupported: Tolerate backslashes in output of failed checks
Avoid passing the output of our `try_compile` through a macro argument.
Macro invocations re-parse their arguments and so should not be given
arbitrary content that may contain backslashes and such.

Instead pass a simple message.  This is also more readable in the case
that the macro generates a message itself.  After the macro returns,
report the real output directly to the variable named by our caller.
Also record the output in a log file as other checks do on failure.

Fixes: #18244
2018-08-30 11:46:19 -04:00
Brad King
b7dbb25a0a CheckIPOSupported: Simplify result reporting logic
Simplify the test for whether a `RESULT` argument was given to the
`check_ipo_supported` call.  Also do not set an empty variable name
if `OUTPUT` was not given.
2018-08-30 11:45:13 -04:00
Brad King
eeb5bb7fe1 Merge topic 'cmake_lang_compiler_predefines'
83f2d48388 Respect CMAKE_<LANG>_COMPILER_ARG1 in CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2316
2018-08-30 09:21:31 -04:00
Brad King
17a60e398c Merge topic 'remove-lua-extra-paths'
2bd71f6377 FindLua: Remove manually specified additional paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Rolf Eike Beer <eike@sf-mail.de>
Merge-request: !2321
2018-08-30 09:17:47 -04:00
Brad King
14553ab64b Merge topic 'android-ndk-r18'
ca97d4cb5f Android: Add support for NDK r18

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2319
2018-08-30 09:14:32 -04:00
Sebastian Holtermann
83f2d48388 Respect CMAKE_<LANG>_COMPILER_ARG1 in CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND
AUTOMOC used to fail to generate ``moc_predefs.h`` when ``ccache`` was used
as a compiler starter by e.g. configuring a project with the environment
variable CXX="ccache g++".
The reason was that ``CMAKE_<LANG>_COMPILER_ARG1`` wasn't respected in the
definition of ``CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND`` for various
compilers.  This is fixed by this patch.

Fixes #17275.
2018-08-28 20:07:53 +02:00
Chuck Atkins
2bd71f6377 FindLua: Remove manually specified additional paths
The additional paths specified are already accounted for in the appropriate
Platform files.
2018-08-28 13:27:35 -04:00
Brad King
ca97d4cb5f Android: Add support for NDK r18
NDK r18 drops GCC toolchains and some STL types.  We need to choose a
clang toolchain by default when no gcc toolchains are available.  Switch
the STL type default to `c++_static` when the old `gnustl_static`
default is not available.

Update the test suite to not run tests for STL types that do not exist.
Also do not expect the gcc toolchain `cpp` tool to be available because
r18 does not provide it.  Also teach it to tolerate `gcc -dumpmachine`
output like `arm--linux-android` that differs from the toolchain prefix.

Fixes: #18301
2018-08-28 09:27:26 -04:00
Chuck Atkins
7d9640dbc2 FindMatlab: Guard against nonexistent installation 2018-08-27 14:57:17 -04:00
Brad King
826e75814b Merge topic 'cray_cce_cxx14'
5a655681c3 Cray: Record C++14 compiler mode options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2307
2018-08-27 14:06:24 -04:00
Brad King
4a1b18db55 Merge topic 'FindZLIB-ProgramFiles'
fbbc6e2eef FindZLIB: Fix path detection via ProgramFiles env variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: RElesgoe <relesgoe@gmail.com>
Merge-request: !2287
2018-08-27 14:02:51 -04:00
Brad King
92de93b974 Merge topic 'xcode-compiler-id-sign-identity'
c68b358ce3 Xcode: Set CODE_SIGN_IDENTITY during compiler identification

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Gregor Jasny <gjasny@googlemail.com>
Merge-request: !2299
2018-08-27 13:54:44 -04:00
Brad King
74b9538c26 Merge topic 'extra-gen-fix-0'
e4e6b63ec9 Extra Generator: Fix extraction of macros with value 0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2308
2018-08-27 13:53:28 -04:00
Kelly (KT) Thompson
5a655681c3 Cray: Record C++14 compiler mode options
Fixes: #18270
2018-08-24 15:15:53 -04:00
Rafal Parzych
c68b358ce3 Xcode: Set CODE_SIGN_IDENTITY during compiler identification
If `CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY` is set then propagate
it to the compiler id test project too.

Fixes: #18292
2018-08-24 13:58:51 -04:00
ibisz
e4e6b63ec9 Extra Generator: Fix extraction of macros with value 0
Fix logic in CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs
to handle macros with value `0`.
2018-08-24 13:51:30 -04:00
Brad King
e90670925f Merge topic 'FindCUDA-deprecate-cublas_device'
bdf1f36135 FindCUDA: Do not find cublas_device on CUDA >= 9.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2298
2018-08-24 13:35:36 -04:00
Brad King
36f49faa3c Merge topic 'cuda-no-cublas_device'
122c79748c CUDA: Avoid using deprecated cublas_device to identify device lib dirs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2296
2018-08-24 13:35:01 -04:00
Andreas Schneider
fbbc6e2eef FindZLIB: Fix path detection via ProgramFiles env variables 2018-08-24 07:24:00 +02:00
Kenta Kubo
bdf1f36135 FindCUDA: Do not find cublas_device on CUDA >= 9.2
The `cublas_device` has been deprecated and will be removed in
future versions of CUDA.

Issue: #18290
2018-08-23 14:49:46 -04:00
Robert Maynard
122c79748c CUDA: Avoid using deprecated cublas_device to identify device lib dirs
Use `curand_static` to identify directories containing device libraries
because `cublas_device` is deprecated and will be removed in the future.

Issue: #18290
2018-08-23 14:43:31 -04:00
Jean-Christophe Fillion-Robin
30d08bdce9 doc: Consistently use <PackageName> for describing the name of a package 2018-08-14 20:54:56 +10:00
Brad King
a9badfa6f4 Merge topic 'intel-windows-xilib'
ef6a08f6f7 Intel: Use xilib as librarian on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Christian Pfeiffer <cpfeiffer@live.de>
Merge-request: !2265
2018-08-09 07:56:26 -04:00
yrHeTaTeJlb
ef6a08f6f7 Intel: Use xilib as librarian on Windows
We already use `xilink` instead of `link`, so use `xilib` instead of lib
too.

Suggested-by: Christian Pfeiffer <cpfeiffer@live.de>
Issue: #18240
2018-08-07 08:32:31 -04:00
Brad King
8f0b3d2da6 Merge topic 'xerces-version-fix'
00a5836a3d FindXercesC: Correct order of version detection and versioned library checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2259
2018-08-07 08:25:21 -04:00
Brad King
d64e41ac48 Merge topic 'nag-fortran-rsp'
10d6c3a635 NAG: Pass response files through front-end to the linker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2250
2018-08-06 08:24:43 -04:00
Brad King
7f981dcf0e Merge topic 'xl-exe-pic'
c2856e0b2b XL: Use -qpic for position independent executables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2249
2018-08-06 08:24:04 -04:00
Brad King
be095b3e7f Merge topic 'FindMatlab-mcc'
f34f6eb3d1 FindMatlab: Add component to find MCC, the Matlab compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2233
2018-08-06 08:23:14 -04:00
Brad King
bed7ee11b7 Merge topic 'FindMatlab-cross-compile'
3434c22c29 FindMatlab: only search registry on windows hosts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2248
2018-08-06 08:22:28 -04:00
Brad King
7142041abd Merge topic 'cuda-arch-version'
37ba34c0b0 FindCUDA/select_compute_arch: Restore two-component CUDA_VERSION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2251
2018-08-06 08:20:54 -04:00
Roger Leigh
00a5836a3d FindXercesC: Correct order of version detection and versioned library checks 2018-08-03 07:54:35 +01:00
Brad King
c7769867d6 Merge branch 'cuda-arch-version' into release-3.12
Merge-request: !2251
2018-08-01 13:47:56 -04:00
Brad King
37ba34c0b0 FindCUDA/select_compute_arch: Restore two-component CUDA_VERSION
Since commit v3.12.0-rc1~332^2 (FindCUDA/select_compute_arch: Add
support for CUDA as a language, 2018-03-15) this module sets
`CUDA_VERSION` based on `CMAKE_CUDA_COMPILER_VERSION` when the language
is enabled.  Limit it to two components for consistency with the
normal `FindCUDA` documentation and behavior.

Fixes: #18231
2018-08-01 13:42:13 -04:00
Brad King
10d6c3a635 NAG: Pass response files through front-end to the linker
The `nagfor` compiler front-end does not support the `@rspfile` syntax.
Use `-Wl,@rspfile` instead to pass it through to the linker.

Fixes: #18232
2018-08-01 13:28:45 -04:00
Brad King
c2856e0b2b XL: Use -qpic for position independent executables
The XL compiler does not have a dedicated "pie" option so use at least
`-qpic`.  This missing setting was exposed by the `ExportImport` and
`PositionIndependentTargets` tests with XL on an ELF platform.
2018-08-01 11:59:50 -04:00
Jason Heeris
f34f6eb3d1 FindMatlab: Add component to find MCC, the Matlab compiler
Add component `MCC_COMPILER` to request searching for the Matlab
compiler.  Report it in `Matlab_MCC_COMPILER` if it is found.

Issue: #18183
2018-08-01 09:23:46 -04:00
Julien Schueller
3434c22c29 FindMatlab: only search registry on windows hosts
From Linux, it fails when cross-compiling
2018-08-01 07:40:25 -04:00
Brad King
24ff152aa0 Merge topic 'UseSWIG-legacy-user-flags'
2f88c177d0 UseSWIG: restore legacy behavior for SWIG_MODULE_<name>_EXTRA_FLAGS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Julien Schueller <schueller@phimeca.com>
Merge-request: !2245
2018-08-01 07:21:34 -04:00
Marc Chevrier
2f88c177d0 UseSWIG: restore legacy behavior for SWIG_MODULE_<name>_EXTRA_FLAGS
Fixes: #18226
2018-07-31 19:33:35 +02:00
Craig Scott
2af5307317 Merge branch 'cpack-default-package-version-zero' into release-3.12
Merge-request: !2239
2018-07-29 19:44:24 +10:00
Craig Scott
50e40b7eec Merge topic 'cpack-default-package-version-zero'
ed015bde2b CPack: Restore support for 0-valued version components

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2239
2018-07-29 05:40:37 -04:00
Brad King
5bbcf76399 Merge topic 'UseSWIG-target-name-policy'
a3a0c3aa71 UseSWIG: add policy to manage target naming strategy.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2232
2018-07-27 10:08:54 -04:00
Brad King
ed015bde2b CPack: Restore support for 0-valued version components
In commit v3.12.0-rc1~136^2 (CPack: Use project version as default for
`CPACK_PACKAGE_VERSION`, 2018-04-29) we did not account for the value of
`CMAKE_PROJECT_VERSION_{MAJOR,MINOR,PATCH}` having `0`.  Fix the logic
to distinguish between unprovided version components and `0` components.

While at it, add a test case covering the behavior described in the
documentation by the original commit.  The number of version components
in the package name should match those provided to the `project()`
command `VERSION` option.

Fixes: #18199
2018-07-27 10:01:29 -04:00
Brad King
c985c97433 Merge topic 'googletest_policy_settings'
7ddc2a110c GoogleTest: Ensure policy settings allow use of IN_LIST

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2237
2018-07-26 10:08:11 -04:00
Marc Chevrier
a3a0c3aa71 UseSWIG: add policy to manage target naming strategy. 2018-07-25 18:00:52 +02:00
Brad King
946318a1ef Merge topic 'GetPrerequisites-dylibsframeworks'
dce77d9ad9 GetPrerequisites: Move dylibs from MacOS to Frameworks folder in bundle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2229
2018-07-25 10:24:10 -04:00
Craig Scott
7ddc2a110c GoogleTest: Ensure policy settings allow use of IN_LIST
If policy settings at the time the GoogleTest module is included are
such that CMP0057 is unset or set to OLD, the use of IN_LIST with
if() will lead to an error. Therefore, explicitly specify the policy
settings for the whole file to ensure the function implementations
have access to the required CMake features.

Fixes: #18198
2018-07-25 21:30:51 +10:00
Harry Mallon
dce77d9ad9 GetPrerequisites: Move dylibs from MacOS to Frameworks folder in bundle
Fixes: #16828
2018-07-24 14:07:22 -04:00
Brad King
07e223ad37 Merge topic 'FindPython-fix-multiple-calls'
50921cc04e FindPython*: fix erroneous behavior on multiple 'find_package' calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2228
2018-07-24 10:58:42 -04:00