Commit Graph

7741 Commits

Author SHA1 Message Date
Brad King
db6ea482f6 Merge topic 'gtest-dynamic-discovery'
bfcda401 Add dynamic test discovery for for Google Test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1056
2017-08-08 09:29:48 -04:00
Shin-ya Murakami
07a4be0d9c FindPkgConfig: On FreeBSD search in libdata/pkgconfig
The pkgconfig dir is placed at `${PREFIX}/libdata/pkgconfig` on FreeBSD
instead of `${PREFIX}/lib/pkgconfig`, where `${PREFIX}` is `/usr/local`
as default.
2017-08-07 10:51:16 -04:00
Brad King
c2cc764582 Merge topic 'FindCygwin-64-bit'
0184531a FindCygwin: Look for Cygwin in C:\Cygwin64.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1091
2017-08-04 09:24:25 -04:00
Gerald Combs
0184531a63 FindCygwin: Look for Cygwin in C:\Cygwin64.
Add "C:\Cygwin64" to the list of Cygwin search paths.
2017-08-04 09:23:05 -04:00
Brad King
86a107cb5c Merge topic 'set_IAR_excetion_option'
168b42d2 IAR: Enable extensions by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1081
2017-08-04 09:15:14 -04:00
Brad King
c5c8ee1a9b Merge topic 'FindHDF5-importedconf-fix'
4956fc26 FindHDF5: fixes for HL when using an imported config
4150048a FindHDF5: unset some variables
9310d008 FindHDF5: for a static imported config, use CONFIG-specific library
fc982844 FindHDF5: fix hdf5-config case with more than one configuration

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1064
2017-08-04 09:14:31 -04:00
Brad King
15f1602584 Merge topic 'android-plain-sysroot'
68d67c82 Android: Fix support for CMAKE_SYSROOT without CMAKE_SYSROOT_COMPILE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1101
2017-08-04 09:11:43 -04:00
Brad King
68d67c827f Android: Fix support for CMAKE_SYSROOT without CMAKE_SYSROOT_COMPILE
If `CMAKE_SYSROOT` is set by the user (e.g. via the toolchain file) then
we do not set `CMAKE_SYSROOT_COMPILE` to our default.  Fix our
references to the sysroot's `/usr/include` directory to use
`CMAKE_SYSROOT_COMPILE` only if it is set and else `CMAKE_SYSROOT`.

Fixes: #17096
2017-08-03 12:03:59 -04:00
Norbert Lange
168b42d247 IAR: Enable extensions by default
Set the variable added by commit a2112257 (Add infrastructure to use
language extensions without any standard, 2017-06-29) for IAR.  This was
accidentally left out of commit d8e6cd9e (IAR: Improve support for IAR
ARM Compiler, 2017-06-15).
2017-08-03 09:56:36 -04:00
Kris Thielemans
4956fc26b5 FindHDF5: fixes for HL when using an imported config
- some variables did not have the appropriate HL infix
- some logic was not yet implemented for HL
2017-08-03 09:49:47 -04:00
Kris Thielemans
4150048a3b FindHDF5: unset some variables
prefixed some local variables with _hdf5 and unset them at the end
(still more of these to do)
2017-08-03 09:49:47 -04:00
Kris Thielemans
9310d00822 FindHDF5: for a static imported config, use CONFIG-specific library
first check the LOCATION_<CONFIG> propertiy to find the library, then
LOCATION
2017-08-03 09:49:47 -04:00
Kris Thielemans
fc9828448d FindHDF5: fix hdf5-config case with more than one configuration
Select a configuration as the first of the following available:

* MAP_IMPORTED_CONFIG_<CONFIG>
* ${CMAKE_BUILD_TYPE}, RELWITHDEBINFO, RELEASE, DEBUG
* First entry in IMPORTED_CONFIGURATIONS

Fixes: #17039
2017-08-03 09:48:19 -04:00
Brad King
973ee6605b Merge topic 'UseSWIG-Java-enabled'
b4fbf677 UseSWIG: Fix when Java is enabled as a language

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1095
2017-08-03 09:33:57 -04:00
Brad King
901456d76e Merge topic 'FindLibXml2-compat'
d1a77565 FindLibXml2: Restore compatibility with projects setting LIBXML2_LIBRARIES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1094
2017-08-02 16:28:24 -04:00
Brad King
b4fbf677bb UseSWIG: Fix when Java is enabled as a language
Since commit v3.8.0-rc1~251^2 (UseSWIG: Record generated java files as
custom command outputs, 2016-11-28) the generated `.java` files are
listed as sources in the call to `add_library` by swig_add_library.
They are listed only as the outputs of custom commands and not intended
for compilation as part of the library.

Reported-by: Alan W. Irwin <irwin@beluga.phys.uvic.ca>
2017-08-02 11:52:36 -04:00
Brad King
155dc75b89 Merge topic 'FindJava-fix-1.6-registry'
5479074b FindJava: fix hint for windows jre 1.6

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1079
2017-08-02 11:42:07 -04:00
Rechi Rechi
5479074be1 FindJava: fix hint for windows jre 1.6
Fix typo in commit v3.8.0-rc1~112^2 (FindJava: add hints for jre,
2017-01-11).
2017-08-02 11:30:48 -04:00
Brad King
d1a7756547 FindLibXml2: Restore compatibility with projects setting LIBXML2_LIBRARIES
In commit a1b38865 (FindLibXml2: Switch to standard module variable
names, 2017-07-11) the cache variable used to store the find_library
result was renamed.  This breaks projects that set the old variable name
explicitly.  Fix compatibility with such projects by using the old
variable as a default if it is set and the new one is not.
2017-08-02 10:35:07 -04:00
Craig Scott
ba83708004 Merge topic 'FindMatlab/CUSTOM_TEST_COMMAND-documentation-fix'
5a9c4aeb FindMatlab: CUSTOM_TEST_COMMAND documentation fix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1086
2017-07-28 20:07:03 -04:00
Craig Scott
d2d8e9edf3 Merge topic 'FindJava_earlyAccessDebian'
e42fa012 Allow early access version trailing string to be mixed case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: Felix Geyer <debfx@fobos.de>
Merge-request: !1080
2017-07-28 07:17:52 -04:00
Craig Scott
ab17dc6bef Merge topic 'FindBoost'
eddbd62d FindBoost: pop policy stack before returning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1078
2017-07-27 16:59:39 -04:00
Raffi Enficiaud
5a9c4aeb9a FindMatlab: CUSTOM_TEST_COMMAND documentation fix
Documentation states CUSTOM_MATLAB_COMMAND, while code uses CUSTOM_TEST_COMMAND.
Addresses issue #17107
2017-07-27 21:35:16 +02:00
Matthew Woehlke
bfcda4013a Add dynamic test discovery for for Google Test
Add a new gtest_discover_tests function to GoogleTest.cmake,
implementing dynamic test discovery (i.e. tests are discovered by
actually running the test executable and asking for the list of
available tests, which is used to dynamically declare the tests) rather
than the source-parsing approach used by gtest_add_tests. Compared to
the source-parsing approach, this has the advantage of being robust
against users declaring tests in unusual ways, and much better support
for advanced features such as parameterized tests.

A unit test, modeled after the TEST_INCLUDE_DIR[S] test, is also
included. Note that the unit test does not actually require that Google
Test is available. The new functionality does not actually depend on
Google Test as such; it only requires that the test executable lists
tests in the expected format when invoked with --gtest_list_tests, which
the unit test can fake readily.
2017-07-27 09:47:28 -04:00
Cristian Adam
eddbd62d0f FindBoost: pop policy stack before returning
CMake would give a fatal error if the policy stack was cleaned up
upon exiting the module.
2017-07-27 07:49:48 +10:00
Craig Scott
e42fa012b6 Allow early access version trailing string to be mixed case
The original regex was expecting to match strings like "ea", but it has
been reported that other strings like "Debian" are also possible.
2017-07-25 22:35:45 +10:00
Craig Scott
561b11d85c Merge topic 'CheckSymbolExists-rename-impl'
4637cc8f CheckSymbolExists: Rename implementation macro

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1067
2017-07-24 18:43:57 -04:00
Brad King
5e3b29f03a Merge topic 'cpack-stgz-help'
29a5cf7c CPack: Add missing options to installer shell script help

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1068
2017-07-21 10:14:19 -04:00
Brad King
43383fa922 Merge topic 'docsExternalProject'
8842a027 ExternalProject: Improve documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1037
2017-07-21 10:12:33 -04:00
Francois Budin
29a5cf7c42 CPack: Add missing options to installer shell script help
`--version` and `--skip-license` were not in the list of
available options when running script with `--help` option.
2017-07-20 11:06:39 -04:00
Cristian Adam
4637cc8f4a CheckSymbolExists: Rename implementation macro
Currently the implementation macro for `check_symbol_exists` is
`_check_symbol_exists`, which impedes CMake users from overriding the
`check_symbol_exists` macro themselves.
2017-07-20 11:03:45 -04:00
Brad King
e14ad2e376 Merge topic 'vs-lang-std'
131c721f MSVC: Add flags for C++ language standards

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1063
2017-07-20 10:51:12 -04:00
Brad King
b10d919de7 Merge topic 'GHS_int_detection'
8eb1cb3f GHS: Correct the regex for the intXXXX directory detection.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1062
2017-07-18 11:12:33 -04:00
Craig Scott
8842a0272b ExternalProject: Improve documentation
- Added clearer structure by grouping the options into logical sections.
- Expanded the details for many of the options.
- Added Examples section to show how to use the various commands.
- Specifically highlighted that the contents of SOURCE_DIR may be lost
  if a download method is also provided.
- Updated argument-matching regex to be more robust and account for the
  varying leading spaces before keywords in the docs.
- Updated tests to account for slightly changed error messages.
2017-07-18 08:39:39 +10:00
Brad King
131c721f54 MSVC: Add flags for C++ language standards
Visual Studio 2015 Update 3 introduced the notion of language standard
levels to MSVC.  The language standard level is defined in `_MSVC_LANG`
instead of `__cplusplus`.  It also added support for the `-std:c++14`
and `-std:c++latest` flags, although the compiler defaults to its C++14
mode anyway.  Visual Studio 2017 Update 3 will introduce support for the
`-std:c++17` flag.

Fixes: #16482
2017-07-17 10:48:43 -04:00
Brad King
9604190701 Merge topic 'FindLibXml2-standard-vars'
a1b38865 FindLibXml2: Switch to standard module variable names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1043
2017-07-17 10:24:54 -04:00
Roman Wüger
8eb1cb3ff1 GHS: Correct the regex for the intXXXX directory detection.
The int directory does not only need to contain digits.
E.g. C:\GHS\int409a is a valid Green Hills installation
2017-07-17 11:30:04 +02:00
Vadim Zhukov
a1b3886556 FindLibXml2: Switch to standard module variable names
* LIBXML2_INCLUDE_DIR talks about libxml2 itself;
* LIBXML2_INCLUDE_DIRS lists also include directories coming from
  libxml2's dependencies and is what libxml2 users should use;
* LIBXML2_LIBRARY talks about libxml2 itself;
* LIBXML2_LIBRARIES is what libxml2 users should link to.

This commit doesn't break existing users of FindLibXml2.cmake,
but provides the way for correct behaviour in future. In particular,
on OpenBSD LIBXML2_INCLUDE_DIR resolves to /usr/local/include/libxml2,
while libiconv (an libxml2 dependency) puts iconv.h
in /usr/local/include, which is not picked up automatically.
2017-07-14 11:25:10 -04:00
Brad King
0f096b8d73 Merge topic 'cmp0054-asm-warning'
336c4fc6 CMakeDetermineASMCompiler: fix a CMP0054 warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1057
2017-07-14 08:24:31 -04:00
Brad King
688b1c11ec Merge topic 'ninja_cuda_export_compile_commands_support'
712af07e CUDA: CMAKE_EXPORT_COMPILE_COMMANDS now works with CUDA and Ninja

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1055
2017-07-14 08:23:58 -04:00
Brad King
652b2956c8 Merge topic 'CMakePushCheckState-fix-RESET'
fda50a08 CMakePushCheckState: Fix cmake_push_check_state RESET argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1040
2017-07-14 08:22:27 -04:00
Ben Boeckel
336c4fc6fa CMakeDetermineASMCompiler: fix a CMP0054 warning
This was introduced in commit d8e6cd9e (IAR: Improve support for IAR ARM
Compiler, 2017-06-15) from !991.

Fixes #17062.
2017-07-13 14:01:38 -04:00
Brad King
9d9085ab36 Merge branch 'ninja_cuda_export_compile_commands_support' into release-3.9 2017-07-13 11:40:08 -04:00
Robert Maynard
712af07e47 CUDA: CMAKE_EXPORT_COMPILE_COMMANDS now works with CUDA and Ninja
Fixes: #17061
2017-07-13 11:23:16 -04:00
Brad King
489a7706c2 Merge topic 'android-system-include-last'
4bafa392 Android: Always add standard include directories last

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1052
2017-07-13 10:07:36 -04:00
Brad King
4bafa3922e Android: Always add standard include directories last
The logic added in commit v3.6.0-rc1~30^2 (Add a variable to specify
language-wide system include directories, 2016-05-24) to use
`CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` incorrectly filters them by
`CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES`.  Rather than recognizing
this, commit v3.8.0-rc1~60^2 (Android: Pass sysroot include directory
explicitly, 2017-01-20) worked around the problem by incorrectly
removing `/usr/include` from `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES`
so it worked in `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES`.

By not filtering out `/usr/include` from user-specified include
directories, we allow the code

    include_directories(${CMAKE_SYSROOT}/usr/include)

to place the include directory too early on the command line.

Fix support for standard include directories to not be filtered by
implicit include directories, and do not remove `/usr/include` from the
list of implicit include directories for Android builds.  Add a test
case to verify that an explicit `/usr/include` is ignored in favor
of the standard directory at the end.

Fixes: #17059
2017-07-13 10:03:58 -04:00
Brad King
a4a39a46c3 Merge topic 'FindProtobuf-protoc-target'
c281acf8 FindProtobuf: add target for protoc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1045
2017-07-13 07:52:09 -04:00
Brad King
f5be951117 Merge topic 'labels-for-subprojects'
376dc3eb Help: Add notes for topic 'labels_for_subprojects'
a70d8e93 Add tests for new directory labels and labels-for-subprojects features
47b3a57c Display subproject timing summary
d3859624 Add directory property 'LABELS' and CMAKE_DIRECTORY_LABELS variable
d08ec4d2 Add CTEST_LABELS_FOR_SUBPROJECTS as a CTest module and script variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1004
2017-07-13 07:46:09 -04:00
Brad King
fda50a0843 CMakePushCheckState: Fix cmake_push_check_state RESET argument
This option was added by commit v2.8.12~138^2 (Add
cmake_reset_check_state() macro, 2013-07-28) but has never worked.
Fix the implementation to refer to macro arguments properly (not as
normal variables).

Fixes: #17048
2017-07-12 15:09:16 -04:00
André Apitzsch
c281acf807 FindProtobuf: add target for protoc 2017-07-12 13:48:22 -04:00