Commit Graph

5067 Commits

Author SHA1 Message Date
Brad King
6c5e03d6d4 Merge branch 'backport-autogen-autouic-lookup' into autogen-autouic-lookup 2017-08-15 13:23:11 -04:00
Sebastian Holtermann
fb5db079a7 Autogen: Extend AUTOUIC search paths test 2017-08-15 13:22:18 +02:00
Daniel Pfeifer
9b3c5ccf12 Server: test cache after reconnect 2017-08-13 23:20:11 +02:00
Brad King
1d51fcaeaf Merge topic 'autogen-merge-redundant'
15ef2728 Autogen: Add test for OBJECT libraries
362f9bd7 Autogen: Merge and remove redundant function calls
952fc65d Autogen: Clear sources meta data cache

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1120
2017-08-11 09:14:40 -04:00
Brad King
0baf114a35 Merge topic 'genex-COMPILE_FEATURES-stds'
4f7d9eef Features: Fix COMPILE_FEATURES genex for C++ 14 and 17 features

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1118
2017-08-11 09:13:39 -04:00
Sebastian Holtermann
15ef27286a Autogen: Add test for OBJECT libraries 2017-08-10 23:15:48 +02:00
Brad King
8c0afd2c75 Merge branch 'find-package_root-disable' into release-3.9
Merge-request: !1116
2017-08-10 09:27:19 -04:00
Brad King
311f338ddc Merge topic 'find-package_root-test-regex'
e574bce1 Tests: Simplify RunCMake.find_package PackageRoot case regexes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Chuck Atkins <chuck.atkins@kitware.com>
Merge-request: !1115
2017-08-10 09:22:17 -04:00
Brad King
f4e66b41d8 Merge topic 'find-package_root-disable'
578d95f8 find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1116
2017-08-10 09:22:02 -04:00
Brad King
4f7d9eef51 Features: Fix COMPILE_FEATURES genex for C++ 14 and 17 features
When `CXX_STANDARD` is not at least 14 or 17, features enabled by the
compiler for those standards should not be reported as existing by the
`COMPILE_FEATURES` genex.  Fix the implementation and add a test.
2017-08-08 13:28:38 -04:00
Brad King
578d95f87d find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9
Disable the feature added by commit v3.9.0-rc1~71^2~2 (find_*: Add a new
PackageRoot search path group, 2017-05-03) and remove documentation
added by commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search
path group, 2017-05-03).  Unfortunately the name `<pkg>_ROOT` may
already be set by projects for their own incompatible purposes.  Disable
the behavior change for now to fix the regression for CMake 3.9.  We can
restore it later with a policy.

In order to keep the implementation and tests working, add an
undocumented variable we can use in the tests to enable the behavior
before the policy is introduced.

Fixes: #17144
2017-08-08 11:52:28 -04:00
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
Brad King
21e86adaf6 Merge topic 'drop-HP-UX'
49640d36 HP-UX: Drop support for building CMake on HP-UX
acd462dd README: Add AIX to list of supported platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1105
2017-08-08 09:22:00 -04:00
Brad King
e574bce15b Tests: Simplify RunCMake.find_package PackageRoot case regexes 2017-08-08 08:23:57 -04:00
Brad King
49640d3629 HP-UX: Drop support for building CMake on HP-UX
CMake will soon require both C++11 and libuv to build.  Neither of
these works on HP-UX, so unfortunately we need to drop support for
the platform until someone can get them working.

Issue: #17137
2017-08-07 09:16:09 -04:00
Sebastian Holtermann
a13716a5dc Autogen: Enable per-config support
Enables the AUTOGEN per-config include directories and wrapper sources
for multi configuration generators.

Closes #16460
2017-08-05 14:37:03 +02:00
Sebastian Holtermann
3a4840e039 Autogen: Make test per-config include directory compatible 2017-08-05 11:21:44 +02:00
Brad King
51f08783c2 Merge topic 'genex-error-grammar'
e49c9eec cmGeneratorExpressionNode: add some missing commas

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1102
2017-08-04 09:17:24 -04:00
Brad King
18cbf898f8 Merge topic 'add-package_root-to-find_package'
4a207116 find_package: Split PACKAGE_ROOT tests to work with smaller regex
9722ff5a find_package: Fix PACKAGE_ROOT test to check find_pacakge(CONFIG) mode.
c5d2b99c find_package: Add missing PACKAGE_ROOT_PATH search path implementation.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1082
2017-08-04 09:09:59 -04:00
Ben Boeckel
e49c9eec27 cmGeneratorExpressionNode: add some missing commas 2017-08-03 13:39:58 -04:00
Chuck Atkins
4a20711690 find_package: Split PACKAGE_ROOT tests to work with smaller regex 2017-08-02 12:03:52 -04:00
Sebastian Holtermann
a3a62fcc3c Autogen: Add AUTOMOC test for target dependencies forwarding
Adds an AUTOMOC test that tests if dependencies from add_dependencies()
of an ORIGIN target are forwarded to the ORIGIN_autogen target.

Also fixes the AUTOMOC test that tests if dependencies from
target_link_libraries() of an ORIGIN target are forwarded to the
ORIGIN_autogen target. The test now fails in the ORIGIN_autogen build
if SimpleLib wasn't built before.
2017-08-01 15:18:46 +02:00
Chuck Atkins
9722ff5a6f find_package: Fix PACKAGE_ROOT test to check find_pacakge(CONFIG) mode. 2017-07-28 10:49:13 -04: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
Sebastian Holtermann
0e434fcf04 Autogen: Move repeated tests to new QtAutogenRerun test
By moving QtAutogen tests that run repeatedly to a new QtAutogenRerun
test, the `ctest -R Qt[45]Autogen -j4` call runs approximately 25%
faster.
2017-07-21 17:03:40 +02:00
Brad King
af9708881f Merge topic 'autogen-include-tests'
f5ccef17 Autogen: Extended mocInclude tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1070
2017-07-21 10:17:09 -04:00
Brad King
81005ff16b Merge topic 'string-clear-intermediate-matches'
b7941641 cmStringCommand: clear intermediate matches

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1065
2017-07-21 10:16:26 -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
Ben Boeckel
b794164143 cmStringCommand: clear intermediate matches
When `string(REGEX REPLACE)` or `string(REGEX MATCHALL)` loop
internally, they store their matches, but they do not clear the previous
match from an earlier iteration. This can leave the contents of
`CMAKE_MATCH_<N>` with bogus values for later matches in the string if
they have groups which earlier matched a non-empty string, but now match
an empty string.

Fixes #17079.
2017-07-21 09:09:56 -04:00
Sebastian Holtermann
f5ccef1751 Autogen: Extended mocInclude tests
The extended tests cover more AUTOMOC use cases.
2017-07-20 16:55:11 +02:00
Brad King
a8d8d2fd05 Merge topic 'autogen-generated-files'
dca5df16 Autogen: Process GENERATED files. Add CMP0071.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1061
2017-07-20 10:52:20 -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
Sebastian Holtermann
dca5df16c5 Autogen: Process GENERATED files. Add CMP0071.
This lets AUTOMOC and AUTOUIC process GENERATED files which
used to be ignored before.
A new policy CMP0071 ensures that the old behavior of ignoring
GENERATED files is enabled when the CMake compatibility version
CMAKE_MINIMUM_REQUIRED is < 3.10.

Closes #16186
2017-07-18 18:11:31 +02:00
Brad King
fc4f352513 Merge topic 'server-refactor'
cf0ae55d server: Add support for connections that aren't event based
5ddfb6a4 server: Add connection as part of a request
d4f5d35c server: Refactor to make the event loop owned by server object
5acbf08b Tests: Teach Server test to forward exit code from server process

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !552
2017-07-18 11:14:02 -04:00
Brad King
407c7415f4 Merge topic 'cmake-E-sha'
c4de0a25 Add sha1sum, sha224sum, sha256sum, sha384sum and sha512sum to command mode
c4647d84 Change ComputeFileMD5 to ComputeFileHash
501a4fee Add some unit tests for md5sum

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1021
2017-07-18 11:12:57 -04:00
Brad King
787017451c Merge topic 'objlib-own-target-objs'
d89e10cd Diagnose object library self-reference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1053
2017-07-18 11:12:00 -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
b97878643b Merge branch 'objlib-own-target-objs' into release-3.9 2017-07-17 11:42:18 -04: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
d89e10cd58 Diagnose object library self-reference
The code

    add_library(A OBJECT a.c)
    target_sources(A PRIVATE $<TARGET_OBJECTS:A>)

used to crash CMake via infinite recursion while evaluating the
generator expression.  Then the change in commit v3.9.0-rc1~266^2~1
(cmGeneratorTarget: Replace source classifier implementation,
2017-04-07) avoided the infinite recursion because GetKindedSources now
creates a map entry and initializes it once.  If it is called again on
the same target during that initialization, the partially computed
results are returned.  This is still wrong but does not crash.
Detect and diagnose this case instead.

Co-Author: Ben Boeckel <ben.boeckel@kitware.com>
Fixes: #16578
2017-07-14 14:05:22 -04:00
André Klitzing
c4de0a25ac Add sha1sum, sha224sum, sha256sum, sha384sum and sha512sum to command mode 2017-07-14 19:49:45 +02: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
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
0f158272d6 Merge topic 'test_include_files'
117033c1 Add TEST_INCLUDE_DIR[S] unit test
ed5bde30 Add TEST_INCLUDE_FILES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1031
2017-07-13 07:46:47 -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
Matthew Woehlke
117033c1d9 Add TEST_INCLUDE_DIR[S] unit test
Add a unit test for the TEST_INCLUDE_DIR and (new) TEST_INCLUDE_DIRS
directory properties.
2017-07-12 13:28:21 -04:00