Commit Graph

13167 Commits

Author SHA1 Message Date
Brad King
b159517414 Merge topic 'FindwxWidgets-imported-target'
e36e455b7c FindwxWidgets: Add an imported target
42c84b1e2e ci: Add wxWidgets to Debian and Fedora base images

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8289
2023-03-09 07:37:49 -05:00
CheesyNacho10
e36e455b7c FindwxWidgets: Add an imported target 2023-03-08 16:39:38 -05:00
scivision
f3e85754b4 Modules:Check*: refactor: use block(SCOPE_FOR POLICIES) 2023-03-08 14:07:55 -05:00
Brad King
f80413ccc4 Merge topic 'findmatlab'
103dbb2fd2 FindMatlab: Windows -wait is only for -r, not -batch
1932ae0284 FindMatlab: refactor: use string(APPEND
c4cacdc7eb FindMatlab: use modern foreach()
af05544c49 FindMatlab: document function input/output
257a3e870e FindMatlab: add Matlab_VERSION and document.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8286
2023-03-08 09:01:46 -05:00
Brad King
12234b2851 Merge topic 'vs-props-order'
d3c4c6d630 VS: Import default C++ props file before toolset-specific props file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8294
2023-03-08 09:00:29 -05:00
scivision
103dbb2fd2 FindMatlab: Windows -wait is only for -r, not -batch 2023-03-07 15:34:36 -05:00
scivision
1932ae0284 FindMatlab: refactor: use string(APPEND 2023-03-07 15:34:36 -05:00
scivision
c4cacdc7eb FindMatlab: use modern foreach()
remove unused superseded commented code
2023-03-07 15:34:35 -05:00
scivision
af05544c49 FindMatlab: document function input/output 2023-03-07 15:34:35 -05:00
scivision
257a3e870e FindMatlab: add Matlab_VERSION and document.
fixes #24569
2023-03-07 15:32:56 -05:00
Matthew Voss
d3c4c6d630 VS: Import default C++ props file before toolset-specific props file
This avoids overwriting toolset-specific settings like `VCRedistDir`
with default settings.

Fixes: #22420
2023-03-07 14:41:32 -05:00
Robert Maynard
21b102c77d FindCUDAToolkit: Add support for finding Tegra cudla library
Fixes #24575
2023-03-07 13:47:16 -05:00
Brad King
617b8df7cf Merge topic 'clang-16-cxx-modules'
3fe8e33f27 Clang: Record Clang 16.0 flags for our experimental C++ modules support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !8285
2023-03-06 08:59:21 -05:00
Brad King
5613d7ed9f Merge topic 'GoogleTest-type-param-suite'
9aa9032266 GoogleTest: Restore suite name for type-parametrized tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8282
2023-03-06 08:53:41 -05:00
Brad King
3fe8e33f27 Clang: Record Clang 16.0 flags for our experimental C++ modules support
LLVM/Clang 16.0 now contains official support for what CMake needs.
2023-03-03 12:44:53 -05:00
Brad King
9aa9032266 GoogleTest: Restore suite name for type-parametrized tests
Fix a regression from commit 073dd1bd81 (GoogleTest: Change format for
typed tests, 2022-02-07, v3.23.0-rc1~4^2) in the suite name detection.

Co-authored-by: Evgeniy Shcherbina <ixsci@pm.me>
Fixes: #24563
2023-03-03 10:38:02 -05:00
Brad King
697ca5d51c Merge topic 'ExternalProject-revert-install'
771387523a ExternalProject: Restore driving install through build system

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Craig Scott <craig.scott@crascit.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8279
2023-03-03 09:22:46 -05:00
Brad King
cb1b95886b Merge topic 'ExternalProject-revert-install' into release-3.26
771387523a ExternalProject: Restore driving install through build system

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Craig Scott <craig.scott@crascit.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8279
2023-03-03 09:22:45 -05:00
Brad King
771387523a ExternalProject: Restore driving install through build system
Revert commit 66b5d51f38 (ExternalProject: Install CMake projects
using 'cmake --install', 2022-09-08, v3.25.0-rc1~150^2).
It changed the ExternalProject install step command from:

    cmake --build <dir> --target install --config <cfg>

to:

    cmake --install <dir> --config <cfg>

The latter command no longer runs the external project build system
during the install step.  We could consider using the commands:

    cmake --build <dir> --target all --config <cfg>
    cmake --install <dir> --config <cfg>

as the install step, but if `CMAKE_SKIP_INSTALL_ALL_DEPENDENCY` is
used in the external project, that can change semantics too.

Revert the original change pending further investigation on other ways
to support its motivating use case.  Add a test covering the
previously-regressed use case.

Fixes: #24567
Issue: #23946
2023-03-02 14:28:26 -05:00
Brad King
3c7e486785 Merge topic 'retry-file-download-on-timeout'
296d2bef06 ExternalProject: Also retry curl download on timeout error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8270
2023-03-02 10:01:43 -05:00
Brad King
1d7fb31778 Merge topic 'Apple-handle-Text-Stubs'
ede33f30cf Apple: Handle generation and comsuption of text-based stubs (.tbd files)
fcbd723a50 Enhance support functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !8204
2023-03-02 09:53:03 -05:00
Brad King
d7df908fc5 Merge topic 'FindPython-fix-CMAKE_SHARED_LIBRARY_SUFFIX-matching'
764441e672 FindPython: fix erroneous ${CMAKE_SHARED_LIBRARY_SUFFIX} matching

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8271
2023-03-01 09:35:42 -05:00
Greg Thain
296d2bef06 ExternalProject: Also retry curl download on timeout error
Since commit f24e34975a (ExternalProject: retry download on recoverable
errors, 2020-08-08, v3.19.0-rc1~298^2~1) ExternalProject has a list of
curl errors which trigger a retry today: 6, 7, 8 and 15.

Add curl error 28.  It is a "timeout error", and should also trigger a
retry attempt at a download of an external project.  The complete list
of curl errors is https://curl.se/libcurl/c/libcurl-errors.html
2023-03-01 09:31:04 -05:00
Brad King
882abea3d8 Merge topic 'FindVulkan-mingw-cross-compiling'
829f1b5be4 FindVulkan: Add more search paths for MINGW when cross compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8256
2023-03-01 09:22:53 -05:00
Marc Chevrier
764441e672 FindPython: fix erroneous ${CMAKE_SHARED_LIBRARY_SUFFIX} matching
Fixes: #24556
2023-03-01 12:34:13 +01:00
Marc Chevrier
ede33f30cf Apple: Handle generation and comsuption of text-based stubs (.tbd files)
Fixes: #24123
2023-03-01 12:23:28 +01:00
Brad King
2e469212c8 Dart,FindDart: Add policy to remove these modules
These modules and the "DART" tool they support have long been replaced
by CTest.
2023-02-28 08:43:45 -05:00
Ralf Habacker
829f1b5be4 FindVulkan: Add more search paths for MINGW when cross compiling
Fixes: #24536
2023-02-28 08:32:01 +01:00
Ben Boeckel
0cca309dfd FindX11: support the xcb-{cursor,shape,xrm} components
Fixes: #24417
2023-02-27 17:40:48 -05:00
Craig Scott
57f09a818c Merge topic 'fetchcontent-reject-CMAKE_TOOLCHAIN_FILE-env-var'
c15674a9cb FetchContent: Reject CMAKE_TOOLCHAIN_FILE env var in sub-build
31ef93f19f FetchContent: Only use @-@ replacements for sub-build CMakeLists.txt

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8248
2023-02-25 17:16:37 -05:00
Brad King
d6831f99fa Merge topic 'FetchContent-generator-instance'
9af0e67ee5 FetchContent: Relay CMAKE_GENERATOR_INSTANCE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8195
2023-02-24 08:36:25 -05:00
Brad King
7552276e6e Merge topic 'GenerateExportHeader-Fix-Clang-support-on-Windows'
1e19936320 GenerateExportHeader: Fix Clang support on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Adrien De Coninck <deconinck.adrien@gmail.com>
Merge-request: !8221
2023-02-24 08:33:23 -05:00
Brad King
2ce23aec9c Merge topic 'find-openssl-find-pthread'
24c7279a6f FindOpenSSL: Search for -pthread flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8246
2023-02-24 08:29:53 -05:00
Craig Scott
c15674a9cb FetchContent: Reject CMAKE_TOOLCHAIN_FILE env var in sub-build
The sub-build should never try to use a toolchain file. The toolchain file
may itself be getting downloaded by FetchContent. If the
CMAKE_TOOLCHAIN_FILE environment variable is set, CMake uses it to
initialize the CMake variable of the same name. We need to explicitly
clear them before the first project call of the sub-build.

Fixes: #24535
2023-02-24 17:17:36 +11:00
Craig Scott
31ef93f19f FetchContent: Only use @-@ replacements for sub-build CMakeLists.txt
There was a mix of ${} and @-@ substitutions in the CMakeLists.txt.in
file. It is sometimes useful to temporarily put ${} evaluations there while
working on issues, but they get replaced. Using @ONLY leaves them
untouched and uses a consistent substitution method for the whole file.
2023-02-24 17:07:01 +11:00
Máté Ferenc Nagy-Egri
9af0e67ee5 FetchContent: Relay CMAKE_GENERATOR_INSTANCE
If set, relay `CMAKE_GENERATOR_INSTANCE`.  It may affect compiler
detection in the subbuild folder.

Fixes: #24404
2023-02-23 17:07:50 -05:00
Kyle Edwards
24c7279a6f FindOpenSSL: Search for -pthread flag
Because -pthread doesn't begin with -l, it doesn't show up in the
pkgconfig LIBRARIES variable, causing FindOpenSSL to not add the
Threads::Threads dependency. Explicitly search LDFLAGS_EXTRA
for -pthread and add the dependency if it's found.

Fixes: #24532
2023-02-23 13:31:23 -05:00
Corentin Damman
1e19936320 GenerateExportHeader: Fix Clang support on Windows
When using Clang with Visual Studio, the GenerateExportHeader function
generates the DEPRECATED definition "__attribute__ ((__deprecated__))",
because Clang can compile such instruction. However, if a user wants to compile
the library with this generated header with MSVC, the declaration is not valid.

We suggest to always use the DEPRECATED definition "__declspec(deprecated)" on
Windows, which is valid for both Clang and MSVC.
2023-02-23 09:19:06 +01:00
Brad King
13d0c2d636 Merge topic 'iar-lang-vars'
3b365c461f IAR: Tolerate variables named for languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8235
2023-02-22 08:43:21 -05:00
Weiqun Zhang
18c2970a97 FindHDF5: Fix detection of Parallel HDF5
To detect Parallel HDF5, the output of `h5pcc -showconfig` was compared
with `Parallel HDF5: yes`.  However, the Boolean flag is not always
`yes` or `no`, because it was set by the value in `HDF5_ENABLE_PARALLEL`
if CMake was used for the configuration.  This commit instead checks to
see if the value is interpreted by CMake as "true".
2023-02-21 12:29:28 -08:00
Joakim Lönnberg
3b365c461f IAR: Tolerate variables named for languages
If a project or user sets a variable or cache entry named `C` or `CXX`,
we were previously comparing those language names to the value of that
variable, rather than the name itself.  Double-quote the string to take
advantage of policy `CMP0054`, but also add "x" prefixes to support
projects that do not set the policy.

This extends a similar fix from commit c8eb357738 (CompilerId: Tolerate
variables named for languages, 2021-06-17, v3.21.0-rc1~9^2).
2023-02-21 09:24:14 -05:00
Brad King
ebf0088efc Merge topic 'GetPrerequisites-linux-x86'
cf2ad9995a GetPrerequisites: Ignore relative paths printed by ldd

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8229
2023-02-21 08:50:59 -05:00
Brad King
286dd53d6c Merge topic 'FindEXPAT-multi-config'
13079f382b FindEXPAT: Fix for debug and other modified builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8225
2023-02-21 08:41:14 -05:00
Brad King
8d5314eff8 Merge topic 'BundleUtilities-chmod-later'
1430f7f574 BundleUtilities: Avoid unnecessary chmod in fixup_bundle_item

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8232
2023-02-21 08:39:00 -05:00
Brad King
70ecc3c36a Merge topic 'BundleUtilities-chmod-later' into release-3.26
1430f7f574 BundleUtilities: Avoid unnecessary chmod in fixup_bundle_item

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8232
2023-02-21 08:38:59 -05:00
Brad King
c4218a7fd1 Merge topic 'FindOpenSSL-threads'
a8cedb1572 FindOpenSSL: Fix regression in dependency on threads

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Bret Brown <mail@bretbrownjr.com>
Acked-by: Matias Lopez <imatlopez@gmail.com>
Merge-request: !8230
2023-02-21 08:37:50 -05:00
Brad King
1430f7f574 BundleUtilities: Avoid unnecessary chmod in fixup_bundle_item
Move the permissions modification added by commit 88fed668b1 (Make
bundle items writable before fixup, 2010-09-07, v2.8.3~129^2) inside the
condition added by commit 45ed314bff (BundleUtilities: do not run
install_name_tool on scripts, 2020-07-27, v3.19.0-rc1~404^2).
There is no reason to add write permissions to a file that we are
not going to modify.

Fixes: #24424
2023-02-20 13:17:04 -05:00
Brad King
a8cedb1572 FindOpenSSL: Fix regression in dependency on threads
Since commit 1b7804edd0 (FindOpenSSL: use extra dependencies from
pkg-config as well, 2022-12-05, v3.26.0-rc1~227^2) we conditionally find
Threads but unconditionally depend on it.  Make the conditions
consistent.

Fixes: #24505
2023-02-20 10:53:42 -05:00
Đoàn Trần Công Danh
cf2ad9995a GetPrerequisites: Ignore relative paths printed by ldd
On x86 Linux, the ldd output for its vDSO (linux-gate.so.1) is a bit
different from other Linux with standard vDSO name (linux-vdso.so.1).

    $ ldd /bin/ls
    linux-gate.so.1 => linux-gate.so.1 (0xf7f5e000)
    libcap.so.2 => /usr/lib32/libcap.so.2 (0xf7f22000)
    libc.so.6 => /usr/lib32/libc.so.6 (0xf7cfb000)
    /lib/ld-linux.so.2 => /usr/lib32/ld-linux.so.2 (0xf7f60000)

This fixes the `Tests/BundleUtilities` test on x86 Linux.
2023-02-20 09:30:40 -05:00
tobil4sk
13079f382b FindEXPAT: Fix for debug and other modified builds
Now considers debug builds, and various other build types which result
in a modified library name by the upstream build system.

Fixes: #24422
2023-02-20 08:48:09 -05:00