Commit Graph

8711 Commits

Author SHA1 Message Date
Brad King
88e6e35358 Merge topic 'module_policy_protection'
8ede35523e IN_LIST: Ensure policy allows if(IN_LIST) if used by a module
e549e31f79 CMakeIOSInstallCombined: Prevent policy leakage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2375
2018-09-14 13:23:10 -04:00
Brad King
cff5151822 Merge topic 'boost-notfound'
ee300dc25d FindBoost: Suppress imported targets warning if Boost was not found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2376
2018-09-14 13:22:18 -04:00
Roger Leigh
ee300dc25d FindBoost: Suppress imported targets warning if Boost was not found
Fixes: #18330
2018-09-12 14:44:57 +01:00
Brad King
1c1a1e08e8 Merge topic 'IAR_6_50_6_fix'
8fdf08c097 IAR: Fix compiler id, version, and arch detection on 6.50.6

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2371
2018-09-12 09:37:58 -04:00
Brad King
8bf5c2326e Merge topic 'FindDoxygen-CMP0057'
e8213404ce FindDoxygen: Ensure policy settings allow use of IN_LIST

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2373
2018-09-12 09:35:45 -04:00
Craig Scott
8ede35523e IN_LIST: Ensure policy allows if(IN_LIST) if used by a module 2018-09-12 14:50:16 +08:00
Craig Scott
e549e31f79 CMakeIOSInstallCombined: Prevent policy leakage
Functions do not introduce a new policy scope, so
surround these policy changes with a push-pop to
prevent them from affecting the caller.
2018-09-12 14:44:59 +08:00
Brad King
e8213404ce FindDoxygen: Ensure policy settings allow use of IN_LIST
In commit v3.9.0-rc1~55^2 (Improve Doxygen support, 2017-04-10)
use of the `IN_LIST` condition was added, but this is only supported
when policy CMP0057 is set to NEW.  Add a policy scope around the
module and enable the policy within it.  Otherwise it works only
in projects that happen to enable the policy.

Fixes: #18361
2018-09-11 15:52:43 -04:00
Daniel Schürmann
8fdf08c097 IAR: Fix compiler id, version, and arch detection on 6.50.6
The IAR 6.50.6 compiler places extra/truncated copies of the
compiler id `INFO:` strings into binaries with a prefix like
`?<Constant "`.  Teach CMakeDetermineCompilerId to ignore them.

Fixes: #18333
2018-09-11 10:43:03 -04:00
Craig Scott
344eb9c8dc Merge topic 'gtest_add_tests-empty-file'
31c82143bf GoogleTest: gtest_add_tests() fails if any source file is empty
d6b06d8d87 GoogleTest: Modify test to verify that empty files can be scanned

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2342
2018-09-11 09:42:31 -04:00
Brad King
528d7625b8 Merge topic 'iar-fail-early'
a26ebb894b IAR: Abort if compiler version or target architecture is not detected

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2353
2018-09-11 08:31:19 -04:00
Brad King
f13d4b1077 Merge topic 'replace-os-x-name-with-macos'
ab2e35d614 Replace occurrences of "Mac OS X" with "macOS" in comments
fc1602456a Help: Replace occurrences of "Mac OS X" with "macOS"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Gregor Jasny <gjasny@googlemail.com>
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Merge-request: !2351
2018-09-11 08:28:05 -04:00
Brad King
dcbad14d23 Merge topic 'FindMPI-restore-flags-string'
e374b9f1eb FindMPI: Restore MPI_<LANG>_COMPILE_FLAGS as a command-line string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Christoph Junghans <junghans@votca.org>
Reviewed-by: Christian Pfeiffer <cpfeiffer@live.de>
Merge-request: !2368
2018-09-11 08:18:55 -04:00
Brad King
e374b9f1eb FindMPI: Restore MPI_<LANG>_COMPILE_FLAGS as a command-line string
Refactoring in commit v3.10.0-rc1~103^2~2 (FindMPI: Modernization from
ground up, 2017-04-25) accidentally left this variable set as a copy of
the `;`-list in `MPI_<LANG>_COMPILE_OPTIONS`, but the flags variable is
documented as a command-line string.  Restore it now.

Fixes: #18349
2018-09-10 14:33:29 -04:00
Daniel Schürmann
a26ebb894b IAR: Abort if compiler version or target architecture is not detected
If these are not detected then we cannot support the IAR compiler.
Fail early with an explicit message instead of silently proceeding
and getting strange errors.

Issue: #18333
2018-09-10 09:03:47 -04:00
Brad King
11de1492d3 Merge topic 'FindOpenSceneGraph-debug'
192e552099 FindOpenSceneGraph: Fix find in Debug

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2341
2018-09-10 08:01:21 -04:00
Brad King
62b56b5ec9 Merge topic 'FindSubversion-wc-info-error'
68d015fc94 FindSubversion: Add Subversion_WC_INFO option to suppress failures

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2292
2018-09-10 07:59:42 -04:00
Brad King
d6853ef405 Merge topic 'extra-generator-split-arg1'
0239b586bd Extra Generator: Fix handling of CMAKE_<LANG>_COMPILER_ARG1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2352
2018-09-10 07:58:10 -04:00
Bartosz Kosiorek
ab2e35d614 Replace occurrences of "Mac OS X" with "macOS" in comments
Apple's main Operating system changed their name from OS X to macOS:

    https://www.engadget.com/2016/06/13/os-x-is-now-macos/

Revise source comments accordingly.
2018-09-10 13:34:09 +02:00
Alessandro
31c82143bf GoogleTest: gtest_add_tests() fails if any source file is empty
Fixes #18321
2018-09-10 16:21:48 +08:00
Craig Scott
49cb2a504d Merge topic 'ExternalProject-check-explicit-include'
df1ddeec12 ExternalProject: Report error if local variables are not defined

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !2281
2018-09-07 19:40:24 -04:00
Jason Heeris
68d015fc94 FindSubversion: Add Subversion_WC_INFO option to suppress failures
Subversion fails when the directory is not actually under its control.
Allow projects to tolerate this case optionally.

Fixes: #18264
2018-09-07 16:17:28 -04:00
Adam Oleksy
0239b586bd Extra Generator: Fix handling of CMAKE_<LANG>_COMPILER_ARG1
The "arg1" value is a command-line string so we must parse it to get
separate arguments for `execute_process`.
2018-09-07 16:11:11 -04:00
Brad King
f782759ed0 Merge topic 'CMakeFindBinUtils-fix-not-cached'
53bae4cc5e CMakeFindBinUtils: Fix use with non-cached tool settings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2355
2018-09-06 10:00:25 -04:00
Brad King
488faed3ce Merge topic 'FindMatlab-no-CMAKE_CL_64'
bfe883af60 FindMatlab: Remove erroneous duplicate code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2354
2018-09-06 09:56:36 -04:00
Jean-Christophe Fillion-Robin
df1ddeec12 ExternalProject: Report error if local variables are not defined
Since in some situations, ExternalProject module may be included in
a sub-directory, functions will be available in the global scope but
local variables like "_ep_keywords_<keyword>" will not be defined, this
commit checks and reports an error indicating that the ExternalProject
module must be explicitly included before using any of the ExternalProject_*
functions  that require the module's inclusion within the current scope
or above.

Co-authored-by: Pablo Hernandez <pablo.hernandez@kitware.com>
Co-authored-by: Craig Scott <craig.scott@crascit.com>
2018-09-06 23:02:24 +10:00
Cyril Boucher
192e552099 FindOpenSceneGraph: Fix find in Debug
As of now, it is not possible to find OpenSceneGraph in Debug because the only
variable find_package_handle_standard_args is checking is ${module}_LIBRARY
while the debug library is in ${module}_LIBRARY_DEBUG. The refactoring gets rid
of the old behaviour to replace with a call to select_library_configurations
which will populated ${module}_LIBRARY accordingly.

[Modules/Findosg_functions.cmake Modules/FindOpenThreads.cmake]
- Include SelectLibraryConfigurations module
- Modify the name of the variable that will be populated by the first
  find_library to ${MODULE}_LIBRARY_RELEASE so that SelectLibraryConfigurations
can act on it
- Add call to select_library_configurations after attempting to find libraries
  in debug and release
2018-09-06 09:32:56 +02:00
Bartosz Kosiorek
fc1602456a Help: Replace occurrences of "Mac OS X" with "macOS"
Apple's main Operating system changed their name from OS X to macOS:

    https://www.engadget.com/2016/06/13/os-x-is-now-macos/

Revise documentation accordingly.
2018-09-05 16:10:49 -04:00
Brad King
3dd926f4a8 Merge branch 'FindMatlab-no-CMAKE_CL_64' into release-3.12
Merge-request: !2354
2018-09-05 15:20:03 -04:00
Raffi Enficiaud
bfe883af60 FindMatlab: Remove erroneous duplicate code
This was left accidentally when resolving merge conflicts between
previous changes.

Fixes: #18221
2018-09-05 15:19:50 -04:00
Brad King
53bae4cc5e CMakeFindBinUtils: Fix use with non-cached tool settings
If a project or toolchain file hard-codes a tool location such as
`CMAKE_LINKER` with a plain `set()` then the value will be stored
in compiler information files but not cached.  If the value is
not cached then we should not mark it as advanced because doing
so will initialize an empty cache entry.

Fixes: #18315
2018-09-05 15:03:02 -04:00
Brad King
cb800ebb83 Merge topic 'FindBoost-old-context'
9a800c12fc FindBoost: Fix context discovery for 1.60 and below

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2348
2018-09-05 14:32:27 -04:00
Brad King
6be7097dbe Merge branch 'FindBoost-old-context' into release-3.12
Merge-request: !2348
2018-09-04 12:43:12 -04:00
Igor Kostenko
9a800c12fc FindBoost: Fix context discovery for 1.60 and below
* `all.hpp` was removed in 1.68:
  2e37599461
* `fcontext.hpp` was moved to detail in 1.61:
  c2f0dfdf26

Fixes: #18126
2018-09-04 12:41:36 -04:00
Brad King
ed80d89b98 Merge topic 'FindBLAS-implicit-blas-final'
8cdff15ef7 FindBLAS: Make Intel MKL the most preferred explicit BLAS library again
608de88f29 FindBLAS: Make Intel MKL code block respect prior found BLAS libraries
5b8f69ebe9 FindBLAS: Detect implicitly linked BLAS library
2c807b75f3 FindBLAS: Re-indent module source code to use normal conventions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2312
2018-08-31 14:51:13 -04:00
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
80bb9214dd Merge branch 'CheckIPOSupported-output-backslashes' into release-3.12
Merge-request: !2331
2018-08-30 11:53:40 -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
Hubertus van Dam
8cdff15ef7 FindBLAS: Make Intel MKL the most preferred explicit BLAS library again
By adding the "if (NOT BLAS_LIBRARIES)" statement to the Intel MKL
detection code block we have unintentionally turned Intel MKL from
the most preferred into the least preferred BLAS library. To fix
this issue the Intel MKL detection code block needs to be moved
forward to make it the first explicit BLAS library we test for.
This is change does just that and re-instates Intel MKL as the
most preferred explicit BLAS library.
2018-08-30 10:52:59 -04:00
Hubertus van Dam
608de88f29 FindBLAS: Make Intel MKL code block respect prior found BLAS libraries
All non-Intel BLAS library detection blocks have an if-statement
"if (NOT BLAS_LIBRARIES)" to ensure that if a BLAS library was
found we are not going to try and find another one. This causes
a problem when we have already found that we do not need to specify
a BLAS library, as the Intel MKL library takes precedence over
everything. Introducing the "if (NOT BLAS_LIBRARIES)" if-statement
fixes this problem.
2018-08-30 10:52:59 -04:00
Hubertus van Dam
5b8f69ebe9 FindBLAS: Detect implicitly linked BLAS library
Run the Check_Fortran_Libraries macro with an *empty* list of libraries
to detect whether the compiler implicitly links BLAS.  If this works,
set `BLAS_LIBRARIES` to a placeholder value to get through the rest of
our logic.  At the end replace the placeholder by a real empty string
again to report to callers.
2018-08-30 10:51:20 -04:00
Kitware Robot
2c807b75f3 FindBLAS: Re-indent module source code to use normal conventions 2018-08-30 10:42:09 -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
0e764082fe Merge branch 'android-ndk-r18' into release-3.12
Merge-request: !2319
2018-08-28 09:44:03 -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