Commit Graph

8257 Commits

Author SHA1 Message Date
William R. Dieter
49d7e0c91d Tests: Make GCOV test more robust to symbolic links in paths
Symbolic links in the path to the cmake build directory caused some
paths to have '..' directories in the path, which are equivalent, but
not a string match for the expected path.  As a result, some tests fail.

Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2021-01-28 09:05:35 -05:00
William R. Dieter
f905cfdc77 Tests: Fix Fortran test C function prototypes
Several extern functions were declared without return type, which results
in warnings.  The functions are for calling Fortran subroutines, so
there should not be a return value.

Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2021-01-28 09:05:35 -05:00
William R. Dieter
4c7e2615b8 Tests: Use the CVS :local: access method for local directories
Windows absolute paths start with a drive letter, followed by the path.
Without an explicit access method specification, CVS treats the drive
letter as a host name.  This changes explicitly adds `:local:` to local
directory repository paths used in tests to avoid this confusion.

See the CVS Manual [1] for more information.

[1] https://www.gnu.org/software/trans-coord/manual/cvs/cvs.html#Repository

Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2021-01-28 09:05:35 -05:00
Brad King
549eedfe85 Tests: Fix CMP0115 warnings in CompileFeatures test
Pass source file extensions explicitly.
2021-01-28 09:05:34 -05:00
Tin Huynh
4de28ba4e6 Tests: Update tests for NVHPC compiler
Treat it just like PGI.
2021-01-27 09:53:02 -05:00
Brad King
9b96fbc358 Merge topic 'clang-tidy-fixes'
ef935b17ab clang-tidy: fix `readability-use-anyofallof` warnings
9ac8dbbb94 clang-tidy: fix `readability-simplify-boolean-expr` warnings
ca505718f4 clang-tidy: fix `readability-redundant-string-init` warnings
b3b6ede6a1 clang-tidy: fix `readability-redundant-access-specifiers` warnings
cdfc4e3195 clang-tidy: fix `readability-qualified-auto` warnings
808b17b120 clang-tidy: fix `readability-make-member-function-const` warnings
4470eb5179 clang-tidy: fix `performance-trivially-destructible` warnings
4f396e6528 clang-tidy: fix `performance-no-automatic-move` warnings
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5731
2021-01-27 09:52:18 -05:00
Brad King
6153bd3a0c Merge topic 'update-bison-parser'
7c6192472b LexerParser: Suppress -Wused-but-marked-unused warning in cmExprParser
6f64300a01 LexerParser: Clean up includes following include-what-you-use
699d50e376 LexerParser: Regenerate parser files with GNU Bison 3.7.4
c95442b9b1 LexerParser: Manual removing code from Bison is no longer needed
5a8a61a798 LexerParser: Do not use GNU Bison's yacc mode, we use Bison extensions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5730
2021-01-27 09:05:43 -05:00
Brad King
f39fb0b90d Merge topic 'outdir-target-genex'
64c3857780 OUTPUT_DIRECTORY: Support tgt genex in output artifact vars

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5690
2021-01-27 09:04:29 -05:00
Brad King
7ab6d1e831 Merge topic 'cpack-compression-threads'
bdf30bdad8 CPack: add CPACK_THREADS variable to control compression threads
bcdb5b52a0 libarchive: Fix lzma_stream_encoder_mt detection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5716
2021-01-27 09:02:35 -05:00
Brad King
eff0f75bd2 Merge topic 'ExternalProject-vcs-tests'
195809914f Tests: Generate simpler ExternalProject sample Git repositories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5741
2021-01-27 09:00:50 -05:00
Ben Boeckel
808b17b120 clang-tidy: fix readability-make-member-function-const warnings 2021-01-27 08:45:45 -05:00
Asit Dhal
64c3857780 OUTPUT_DIRECTORY: Support tgt genex in output artifact vars
Following variables now support target dependent generator expressions.
- CMAKE_RUNTIME_OUTPUT_DIRECTORY
- CMAKE_LIBRARY_OUTPUT_DIRECTORY
- CMAKE_ARCHIVE_OUTPUT_DIRECTORY

Fixes: #18055
2021-01-26 12:13:15 -05:00
Rodolfo Lima
bdf30bdad8 CPack: add CPACK_THREADS variable to control compression threads
This allows setting how many threads the compressor will use.
Currently only implemented for XZ when using system's lzma library.

Fixes: #21715
2021-01-26 16:23:37 +01:00
Brad King
1380e611e1 Merge topic 'nmc-cache-targets'
ccbedb80e4 Ninja Multi-Config: Restore rebuild_cache and edit_cache targets
6fdbe9201f cmNinjaUtilityTargetGenerator: Remove leftover development comment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5740
2021-01-26 09:09:18 -05:00
Brad King
a5124f6bad Merge topic 'reproducible-unity-id'
ee9da76972 Unity: Generate reproducible unity IDs for anonymous namespaces

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5727
2021-01-26 09:00:28 -05:00
Brad King
195809914f Tests: Generate simpler ExternalProject sample Git repositories
The `gitrepo.tgz` repository contains a project that enables both
C and CXX languages and builds source code.  This take a long time
to repeat over and over, particularly on Visual Studio and Xcode
generators.  Add and use a script to generate a new test repository
that has a much simpler project.

Issue: #20733
2021-01-25 17:31:21 -05:00
Brad King
ccbedb80e4 Ninja Multi-Config: Restore rebuild_cache and edit_cache targets
Since commit dcf9f4d2f7 (Ninja Multi-Config: Add support for
cross-config custom commands, 2020-12-09) we were not generating these
targets.  Restore them and add a test.

Fixes: #21722
2021-01-25 15:22:53 -05:00
Christoph Grüninger
699d50e376 LexerParser: Regenerate parser files with GNU Bison 3.7.4
Adjust expected test output.
2021-01-25 12:06:17 -05:00
Brad King
adaa393115 Merge topic 'cpack-deb-shlibdeps-private-search-dirs'
d586a4ad60 CPackDeb: dpkg-shlibdeps now supports searching for private shared libs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5718
2021-01-25 11:39:39 -05:00
Craig Scott
ee9da76972 Unity: Generate reproducible unity IDs for anonymous namespaces
Fixes: #21564
2021-01-23 07:14:05 +11:00
Deniz Bahadir
d586a4ad60 CPackDeb: dpkg-shlibdeps now supports searching for private shared libs
The new CPack variable `CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS`
can be set to a list of directories. If `CPACK_DEBIAN_PACKAGE_SHLIBDEPS`
or `CPACK_DEBIAN_<component>_PACKAGE_SHLIBDEPS` are set to `ON` these
directories will be searched by `dpkg-shlibdeps` in order to find
private shared library dependencies of the libraries/executables that
shall be packed.
2021-01-22 08:33:01 -05:00
Marc Chevrier
89b01b04fa UseSWIG: use swig tool to generate dependencies
add_custom_command() supports option DEPFILE when generator is
Makefiles or Ninja. And swig tool is able to generate a dependencies
file which is compatible with DEPFILE option.
2021-01-21 19:29:04 +01:00
Brad King
c69567e56a Merge topic 'FindGit-cache-version'
76fdeb6d13 Tests: FindGit already provides the git version, re-use it
315a200f0c FindGit: Cache the GIT_EXECUTABLE version for the current run

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5712
2021-01-21 09:27:04 -05:00
Brad King
6bf23b2755 Merge topic 'macos-include-weak-dependencies'
7e615a540e file(GET_RUNTIME_DEPENDENCIES): Fix weak macOS libraries not detected
f2d92b983b GetPrerequisites: Include weak macOS dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5703
2021-01-21 09:16:37 -05:00
Brad King
063f7127d1 Merge topic 'ninja-custom_command-depfile'
b5c2163293 Ninja: add_custom_command(DEPFILE): Ensure dependencies consistency

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5710
2021-01-20 11:23:13 -05:00
Bianca van Schaik
7e615a540e file(GET_RUNTIME_DEPENDENCIES): Fix weak macOS libraries not detected
Starting with Clang 12, `otool -l` reports `LC_LOAD_WEAK_DYLIB` instead
of `LC_LOAD_DYLIB` for weakly linked libraries.  Update the
implementation of `file(GET_RUNTIME_DEPENDENCIES)` to recognize these.

Fixes: #21684
2021-01-20 10:26:54 -05:00
Craig Scott
76fdeb6d13 Tests: FindGit already provides the git version, re-use it 2021-01-20 10:16:21 +11:00
Marc Chevrier
b5c2163293 Ninja: add_custom_command(DEPFILE): Ensure dependencies consistency
Fixes: #21694
2021-01-19 13:17:14 +01:00
Brad King
7d498d6b43 Utilities/Sphinx: Add role and directive for 'genex' in CMake domain
This enables cross-reference syntax for CMake generator expressions:

    :genex:`SOME_GENEX`
    :genex:`$<SOME_GENEX>`
    :genex:`$<SOME_GENEX:...>`

and definition of CMake generator expressions via a directive:

    .. genex:: SOME_GENEX
    .. genex:: $<SOME_GENEX>
    .. genex:: $<SOME_GENEX:...>

It also adds generator expressions defined by the directive and by
`Help/genex/SOME_GENEX.rst` documents to the index.
2021-01-18 12:35:41 -05:00
Brad King
621ba5e1f2 cmRST: Add support for 'envvar' directive
This was accidentally left out of commit 8acf46caf1 (Utilities/Sphinx:
Add role and directive for 'envvar' in CMake domain, 2018-04-19,
v3.12.0-rc1~200^2~1).
2021-01-18 12:35:40 -05:00
Brad King
54dbc9c8f7 Merge topic 'ep-stash-options'
ac4a8002a5 ExternalProject: Don't git stash ignored files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5390
2021-01-18 11:20:45 -05:00
Brad King
cbcb507227 Merge topic 'issue-17794'
8f33674491 cpack(DEB): Issue warning if custom script for control file is missing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5705
2021-01-18 11:16:44 -05:00
Brad King
28523d63ff Merge topic 'FindPostgreSQL-server-component'
8b066f1a65 FindPostgreSQL: Add server component

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5680
2021-01-18 11:16:04 -05:00
Craig Scott
ac4a8002a5 ExternalProject: Don't git stash ignored files
The change to the binary gitrepo.tgz file adds a commit which
adds a .gitignore file.

Fixes: #21278
2021-01-16 18:12:00 +11:00
Asit Dhal
8f33674491 cpack(DEB): Issue warning if custom script for control file is missing
Fixes: #17794
2021-01-15 16:41:37 +01:00
Alexey Edelev
8b066f1a65 FindPostgreSQL: Add server component
Require the server-specific artifacts only if the Server
component is requested.

Issue: #17223
2021-01-15 10:33:55 -05:00
Brad King
c6845f9495 Tests: Remove outdated CMakeTestMultipleConfigures test
In practice this test has not helped us find any problems AFAIK.  Tests
like RunCMake.BuildDepends and other RunCMake tests cover much of what
this test was meant to do.  Since CMakeTestMultipleConfigures takes a
long time to run on some generator/platform combinations, it is not
worth what it covers.  Remove the test.
2021-01-15 09:27:17 -05:00
Marc Chevrier
50b8dc8735 Merge topic 'cmake_path-stabilization'
76f0bcdfb6 cmake_path: various updates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5695
2021-01-15 05:47:02 -05:00
Brad King
cc47f4ebf9 Merge topic 'fileapi-toolchains'
6418dabb87 Tests: Add test for toolchains-v1 File API object
1c5bd1bed5 Tests: Add toolchains kind to capabilities test
f72bb2ee0d Help: Add documentation for "toolchains" object kind
bb069c0857 cmFileAPI: Add "toolchains" object kind.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5678
2021-01-14 13:02:54 -05:00
Brad King
224956255d Merge topic 'fuzz1'
b0107165b7 Tests: Add a fuzzer for oss-fuzz

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5668
2021-01-14 13:01:22 -05:00
Brad King
967d1f7dde Merge topic 'install-FILES-rename-genex'
ac3ccc393e install(files): Support genex in rename option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5694
2021-01-14 13:00:16 -05:00
Marc Chevrier
76f0bcdfb6 cmake_path: various updates
To follow discussions in #21385 and !5682:
* Fix bug in cmCMakePath::IsSuffix() method
* cmake_path(HASH) always normalized paths (NORMALIZE option removed)
2021-01-13 15:27:49 +01:00
Brad King
438ed46c13 Merge topic 'ExternalProject-configure-handled-by-build'
7155e358c9 ExternalProject: Add CONFIGURE_HANDLED_BY_BUILD option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5626
2021-01-13 09:21:47 -05:00
Brad King
27c2579efd Merge topic 'issue-21663'
38e2299fc8 list(REMOVE_ITEM): Make removal of an empty item a no-op.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5693
2021-01-13 09:21:00 -05:00
Brad King
00d8a1dff8 Merge topic 'depend_make_refine'
4d509437cb cmDepends: disable long line dependencies for nmake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5689
2021-01-13 09:20:13 -05:00
AdamKorcz
b0107165b7 Tests: Add a fuzzer for oss-fuzz 2021-01-13 11:04:59 +00:00
Asit Dhal
ac3ccc393e install(files): Support genex in rename option
Fixes: #19903
2021-01-13 11:27:56 +01:00
Ben McMorran
6418dabb87 Tests: Add test for toolchains-v1 File API object 2021-01-12 15:43:38 -08:00
Ben McMorran
1c5bd1bed5 Tests: Add toolchains kind to capabilities test 2021-01-12 14:25:39 -08:00
Brad King
db8e2e711a Merge topic 'ninja-multi-config-post-build'
98805a11ce Ninja Multi-Config: Run POST_BUILD when BYPRODUCTS don't overlap

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5673
2021-01-12 10:25:07 -05:00