Commit Graph

7418 Commits

Author SHA1 Message Date
Brad King 4150a18910 Tests: Fix -Wstrict-prototypes warnings in some C sources
Some RunCMake tests fail with this warning due to extra stderr content:

    warning: this old-style function definition is not preceded by a prototype

Convert `foo()` to `foo(void)` in `.c` sources of affected tests.
2020-05-13 08:11:59 -04:00
Brad King fe19df49d4 Initialize CMAKE_EXPORT_COMPILE_COMMANDS only if not set already
Also de-duplicate its initialization code.

Fixes: #16588
2020-05-12 08:08:20 -04:00
Brad King eb2a554b12 Merge topic 'vs-pch-compile-opts'
6b2fb4ffd2 VS: Fix using PCH from source with COMPILE_OPTIONS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4734
2020-05-12 06:53:41 -04:00
Brad King 6b2fb4ffd2 VS: Fix using PCH from source with COMPILE_OPTIONS
If a source file gets per-source flags from both PCH and custom
`COMPILE_OPTIONS`, combine them correctly.

Fixes: #20694, #20456
2020-05-11 11:58:41 -04:00
Brad King 50f6207c52 Merge topic 'doxygen-generated-sources'
5ec9690802 FindDoxygen: Allow generated files with USE_STAMP_FILE
683abe4366 FindDoxygen: Formatting-only indentation cleanup for test case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4726
2020-05-11 10:16:37 -04:00
Brad King d4b1d3d4f0 Merge topic 'source_group_forward_slashes'
faf44a8cdb source_group: Support forward slashes in group hierarchy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4727
2020-05-11 10:14:24 -04:00
Brad King cee7eb8b3a Merge topic 'unity_explicit_groups'
9f4eb352fe Unity Builds: Support explicit specification of sources to groups
b00585adcc Unity: Refactor implementation to make it easier to extend

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4716
2020-05-11 10:08:12 -04:00
Craig Scott faf44a8cdb source_group: Support forward slashes in group hierarchy
Fixes: #18076
2020-05-11 08:15:25 +10:00
Craig Scott 5ec9690802 FindDoxygen: Allow generated files with USE_STAMP_FILE
Fixes: #20597
2020-05-09 13:35:51 +10:00
Craig Scott 683abe4366 FindDoxygen: Formatting-only indentation cleanup for test case 2020-05-09 13:35:41 +10:00
Brad King 171bf5fa92 Merge topic 'third-parties-layout'
2faa3f6c55 Refactoring: Third-parties public headers are under cm3p prefix
75e87e3db4 bootstrap: update list of problematic files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4705
2020-05-08 08:18:17 -04:00
Brad King 5c9d0905e7 Merge topic 'docker-rel-win'
7670ba8b0a Utilities/Release: Drop win{32,64} scripts in favor of docker build
ff929badb3 Utilities/Release: Add docker specs to build and test Windows binaries
5f4f7e637a Utilities/Release: Generalize OS in README docker instructions
13467f1dbd Utilities/Release: Make README docker examples more readable
593c3fa1d4 Utilities/Release: Remove unused linux/x86_64/test/cache-ninja.txt

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4719
2020-05-08 08:04:51 -04:00
Brad King fb4959eadc Merge topic 'FindPython-check-specified-version'
71229f2c85 Merge branch 'backport-3.17-FindPython-check-specified-version' into FindPython-check-specified-version
e1c869906c FindPython: ensure any specified version is correctly handled
25978c7a00 FindPython: ensure any specified version is correctly handled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4718
2020-05-08 08:02:24 -04:00
Robert Maynard 9f4eb352fe Unity Builds: Support explicit specification of sources to groups
Instead of having CMake determine which files should go into each
unity file, the user can now use explicitly state the mapping.
2020-05-07 11:13:34 -04:00
Craig Scott b743ffbfa2 Merge topic 'script-mode-and-arbitrary-args'
e4f1b301fe cmake: Allow arbitrary args passed to CMake script

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4707
2020-05-07 09:09:52 -04:00
Marc Chevrier 2faa3f6c55 Refactoring: Third-parties public headers are under cm3p prefix
Fixes: #20666
2020-05-07 12:06:08 +02:00
Marc Chevrier 71229f2c85 Merge branch 'backport-3.17-FindPython-check-specified-version' into FindPython-check-specified-version 2020-05-07 11:26:22 +02:00
Marc Chevrier 25978c7a00 FindPython: ensure any specified version is correctly handled
Fixes: #20674
2020-05-07 11:19:36 +02:00
Brad King b86dfa2056 Merge topic 'gtest-space-in-parameter'
839a1010a3 GoogleTestAddTests: Fix output processing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4694
2020-05-06 09:31:53 -04:00
Brad King 6ccbf6ba71 Merge topic 'FindPkgConfig-isystem' into release-3.17
e9d93c3731 Help: Add 3.17 release note for FindPkgConfig '-isystem' fix
dfaaae67a3 Merge branch 'backport-3.16-FindPkgConfig-isystem'
4d446c68d1 FindPkgConfig: also handle "-isystem" prefixes for include directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4693
2020-05-06 09:28:30 -04:00
Brad King 1aecbda756 Merge topic 'FindPkgConfig-isystem'
502e562940 Merge branch 'backport-3.17-FindPkgConfig-isystem' into FindPkgConfig-isystem
e9d93c3731 Help: Add 3.17 release note for FindPkgConfig '-isystem' fix
dfaaae67a3 Merge branch 'backport-3.16-FindPkgConfig-isystem'
cd31a8acef FindPkgConfig: also handle "-isystem" prefixes for include directories
4d446c68d1 FindPkgConfig: also handle "-isystem" prefixes for include directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4693
2020-05-06 09:28:30 -04:00
Brad King 4ec59891ad Merge topic 'CheckLanguage-cuda-host' into release-3.17
5b304a7503 CheckLanguage: Fix forwarding of CMAKE_CUDA_HOST_COMPILER

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !4711
2020-05-06 09:27:13 -04:00
Brad King 1cadb625f2 Merge topic 'CheckLanguage-cuda-host'
5b304a7503 CheckLanguage: Fix forwarding of CMAKE_CUDA_HOST_COMPILER

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !4711
2020-05-06 09:27:13 -04:00
Brad King dfaaae67a3 Merge branch 'backport-3.16-FindPkgConfig-isystem' 2020-05-06 07:45:55 -04:00
Alex Turbov e4f1b301fe cmake: Allow arbitrary args passed to CMake script 2020-05-06 21:40:36 +10:00
Brad King 7670ba8b0a Utilities/Release: Drop win{32,64} scripts in favor of docker build
Also drop the `CMakeNightlyWin{32,64}` tests that use the scripts.

Follow the pattern from commit 689fdbfc61 (Utilities/Release: Drop
linux64 script in favor of docker build, 2019-08-27, v3.16.0-rc1~184^2).
2020-05-05 14:56:56 -04:00
Rolf Eike Beer cd31a8acef FindPkgConfig: also handle "-isystem" prefixes for include directories
Fixes: #20652
2020-05-05 18:38:50 +02:00
Rolf Eike Beer 4d446c68d1 FindPkgConfig: also handle "-isystem" prefixes for include directories
Fixes: #20652
2020-05-05 18:30:38 +02:00
Brad King 5b304a7503 CheckLanguage: Fix forwarding of CMAKE_CUDA_HOST_COMPILER
Fix the condition added by commit fada8cbfd6 (CheckLanguage: Report
CMAKE_CUDA_HOST_COMPILER if needed for compilation, 2019-05-31,
v3.15.0-rc1~12^2) to activate CUDA-specific logic.  The old condition
had worked in our test suite only by accident because the loop variable
used in the test happened to be the name and value that the old
condition used!  Update the test to use a different name.

Fixes: #19013
2020-05-05 09:50:29 -04:00
Brad King d3d53eefee Merge topic 'remove_cli__symbols'
be75622e49 bindexplib: Do not export symbols from managed code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4692
2020-05-05 09:07:25 -04:00
Stefan Floeren 839a1010a3 GoogleTestAddTests: Fix output processing
The function gtest_discover_tests calls the passed test executable with
the parameter --gtest_list_tests and parses the output to find all
tests.

In case of value-parameterized tests ([1]), the test values are included
in the output. While test names are alphanumeric, the values can contain
arbitrary content.

First, the output is separated into lines with `foreach`. Included
semi-colons breaks this and need to get escaped.

Afterwards, the testname is passed on to the `add_command` helper. This
helper was converted into a macro in commit dac201442d (GoogleTest:
Optimize gtest_discover_tests, 2020-02-18). As a macro, its arguments
are re-evaluated. Therefore we need to escape `\`, `;` and to prevent
unwanted variable expansion `$`.

Fixes: #20661

[1] <https://github.com/google/googletest/blob/0eea2e9/googletest/docs/advanced.md#value-parameterized-tests>
2020-05-05 07:23:17 +00:00
Markus Mayer be75622e49 bindexplib: Do not export symbols from managed code
Fixes: #20653
2020-05-04 09:58:09 +02:00
Marc Chevrier c1ef70d4d1 FindPython: Add support for 'PyPy' 2020-05-01 15:03:04 +02:00
Brad King 6556e587ef Merge topic 'FPHSA-handle-components'
0b6332af60 FPHSA: REQUIRED_VARS is optional if HANDLE_COMPONENTS is specified

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4690
2020-05-01 08:33:30 -04:00
Brad King 8228246d9b Merge topic 'CTestCoverageCollectGCOV-compress-opts'
40ca6ef125 CTestCoverageCollectGCOV: Add TARBALL_COMPRESSION option
81e83510a0 Tests: Fix re-running CTestCoverageCollectGCOV on in-source build
ab7eda2591 Tests: Remove unnecessary pass regex on CTestCoverageCollectGCOV

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4649
2020-05-01 08:28:50 -04:00
Brad King 68a59ab288 Merge topic 'stl-support'
8d4a9ee398 Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4689
2020-05-01 08:27:37 -04:00
Brad King d1d1d4134d Merge topic 'ctest-nightly-start-time'
4f2fa2459a Tests: Add tests to demonstrate when CTEST_NIGHTLY_START_TIME is needed
c1397ace1d Help: Clarify why CTEST_NIGHTLY_START_TIME is needed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4688
2020-05-01 08:26:29 -04:00
Kelly (KT) Thompson 40ca6ef125 CTestCoverageCollectGCOV: Add TARBALL_COMPRESSION option
For large projects, the default bzip2 compression of gcov data is
prohibitively expensively (could take several hours).  Introduce options
that allow the consumer to choose between file size and compression time.

Add a new optional argument `TARBALL_COMPRESSION` for the macro
`ctest_coverage_collect_gcov`. This option accepts the values `GZIP`,
`BZIP2`, `XZ`, `FROM_EXT`, or an expression that evaluates to `FALSE`.
The default value is `BZIP2` to preserve prior behavior.

Fixes: #20593
2020-04-30 08:42:00 -04:00
Brad King 81e83510a0 Tests: Fix re-running CTestCoverageCollectGCOV on in-source build
Do not remove the test binary directory if it contains `CMakeCache.txt`.
Otherwise in an in-source build we remove the source directory too.
2020-04-30 08:42:00 -04:00
Marc Chevrier 0b6332af60 FPHSA: REQUIRED_VARS is optional if HANDLE_COMPONENTS is specified
Fixes: #20655
2020-04-30 10:54:36 +02:00
Marc Chevrier 8d4a9ee398 Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view> 2020-04-30 09:53:27 +02:00
Kyle Edwards 4f2fa2459a Tests: Add tests to demonstrate when CTEST_NIGHTLY_START_TIME is needed 2020-04-29 15:36:12 -04:00
Ben Boeckel 99663a5157 IWYU: mark <cstddef> as needed
Newer IWYU is not seeing this as necessary for `_GLIBCXX_USE_CXX11_ABI`.
2020-04-29 11:16:44 -04:00
Ben Boeckel 24a9fed5d9 IWYU: mark <cstddef> as needed
Newer IWYU is not seeing them as needed for `size_t`.
2020-04-29 11:16:44 -04:00
Brad King d63c442a6b Merge topic 'vs_platform_toolset'
197b4cbe18 VS: Add option for per-target PlatformToolset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4682
2020-04-29 10:50:42 -04:00
Brad King ab7eda2591 Tests: Remove unnecessary pass regex on CTestCoverageCollectGCOV
The test script uses `message(FATAL_ERROR)` on failure, so we
can just let the `ctest` exit code determine the result.
2020-04-29 09:19:06 -04:00
Julien Jemine 197b4cbe18 VS: Add option for per-target PlatformToolset
Add a `VS_PLATFORM_TOOLSET` target property to set `PlatformToolset` in
the `.vcxproj` file for specific targets.  Document that this is safe
only when the named toolset uses the same underlying compiler as the
primary toolset.

Fixes: #17429
2020-04-29 07:35:57 -04:00
Brad King 959acdc9e6 Merge topic 'FindLibXslt-targets'
8a90ef5a44 FindLibXslt: use LIBXSLT_LIBRARY as cache variable
1aa7df4114 FindLibXslt: provide imported targets
dd506714f4 FindLibXslt: identify libexslt include directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4650
2020-04-29 07:33:50 -04:00
Brad King c9fdee6a67 Merge topic 'FindPython-find-implementations'
d2c47c822b FindPython: Add capability to specify Python implementations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4676
2020-04-29 07:30:24 -04:00
Markus Rickert 1aa7df4114 FindLibXslt: provide imported targets 2020-04-28 19:14:03 +02:00