58077 Commits

Author SHA1 Message Date
Brad King
31f835410e CMake 3.24.2 v3.24.2 2022-09-13 09:53:22 -04:00
Brad King
ef75657851 Merge topic 'fetchcontent-redirect-version-exact' into release-3.24
48b380c961 FetchContent: Ignore EXACT for redirected find_package() calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7665
2022-09-12 09:38:06 -04:00
Brad King
20f36aae14 Merge topic 'FortranCInterface-LLVMFlang' into release-3.24
0f5b6dd215 FortranCInterface: Add support for LLVMFlang mangling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7658
2022-09-12 09:36:06 -04:00
Craig Scott
31e832133a Merge topic 'fetchcontent-unset-wrong-nested-var' into release-3.24
d9a6e0ffc8 FetchContent: Fix unsetting wrong variable name after provider returns

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7663
2022-09-11 18:09:09 -04:00
Craig Scott
48b380c961 FetchContent: Ignore EXACT for redirected find_package() calls
When FetchContent_MakeAvailable() populates a dependency for which
find_package() integration is enabled, all future calls to find_package()
MUST succeed using the contents of the redirection directory. The
generated config version file was not handling calls where the EXACT
keyword was given, resulting in such calls rejecting the redirection
directory's contents and continuing its search. It is not allowed to do
that. Fix the generated file to also set PACKAGE_VERSION_EXACT to
true so that calls with EXACT now accept it, as was originally intended.

Fixes: #23950
2022-09-11 18:36:31 +10:00
Craig Scott
d9a6e0ffc8 FetchContent: Fix unsetting wrong variable name after provider returns
The unset() command was using __cmake_contentNameLower before that
variable was restored from the __cmake_fcCurrentVarsStack. That means
if there had been a nested call to FetchContent_MakeAvailable(), the wrong
variable name would have been cleared (the nested name instead of the
one from the current call). That would have left the variable set upon return,
blocking the dependency provider from seeing any further calls to
FetchContent_MakeAvailable() in the current variable scope or below for the
current dependency.
2022-09-10 18:23:21 +10:00
Gilles Gouaillardet
0f5b6dd215 FortranCInterface: Add support for LLVMFlang mangling
The following `module.f90` file

    module mymodule
    contains
      subroutine mysub()
      end subroutine
    end module

when compiled with `flang-new` (from LLVM 15.0.0) generate the
`_QMmymodulePmysub` symbol.

    $ flang-new -c module.f90
    $ nm module.o
    0000000000000000 T _QMmymodulePmysub

This commit fixes the regular expressions accordingly.
2022-09-09 10:37:56 -04:00
Brad King
a2f9e674bb Merge topic 'fetchcontent-extra' into release-3.24
629d106c5e Help: Fix typo in FetchContent example, extras should read extra

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: hinell <al.neodim@gmail.com>
Merge-request: !7657
2022-09-09 09:53:40 -04:00
Brad King
6695957237 Merge topic 'truncation_invalid' into release-3.24
bd30d20bc3 Tests: Add cases covering bad ctest output truncation types
dbf840392d ctest: print error for invalid CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7596
2022-09-09 09:52:04 -04:00
Brad King
11754888a8 Merge topic 'revert-automoc-silence-warnings' into release-3.24
e08d34eda1 automoc: revert attempts to silence linker warning on macos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7652
2022-09-09 09:50:04 -04:00
Brad King
dac4f26918 Merge topic 'check-library-properties-fix-performances-regression' into release-3.24
985b4c82a6 Check link libraries properties: fix performances regression
a47eef32a3 renames method FinalizeTargetCompileInfo() in FinalizeTargetConfiguration().

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7651
2022-09-09 09:48:55 -04:00
Mathieu Malaterre
629d106c5e Help: Fix typo in FetchContent example, extras should read extra
Amends 29e31e2825 (Packages: Integrate FetchContent and
find_package(), 2022-04-28)
2022-09-09 20:08:32 +10:00
Brad King
bd30d20bc3 Tests: Add cases covering bad ctest output truncation types
Issue: #23869
2022-09-07 12:23:08 -04:00
Frank Winklmeier
dbf840392d ctest: print error for invalid CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION
Print an error message for invalid values of
`CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION` in a ctest dashboard script.
The option was added by commit 140704d443 (ctest: add option for
output truncation, 2022-03-07, v3.24.0-rc1~513^2).

Fixes: #23869
2022-09-07 11:52:03 -04:00
Brad King
e08d34eda1 automoc: revert attempts to silence linker warning on macos
We've made several attempts to add a dummy symbol to `mocs_compilation.cpp`
when there are no automoc sources:

* commit 4a9daae483 (automoc: silence linker warning on macos,
                     2022-05-25, v3.24.0-rc1~55^2)
* commit 844244ccdc (automoc: avoid compiler warnings in linker-warning-
                     silencing code, 2022-08-10, v3.24.1~6^2)
* commit fc8628389f (automoc: avoid more compiler warnings in linker-
                     warning-silencing code, 2022-08-29)

The last attempt derives a symbol name from the path to the source
file, but that breaks reproducible builds because it is not stable
w.r.t. the location of the build tree.  Revert all these attempts
for the 3.24 release series, and return to what 3.23 and below did.
Further investigation will be needed to resolve the original issue.

Fixes: #23937
Issue: #23551, #23823, #23823
2022-09-07 10:35:17 -04:00
Brad King
9a916eaae3 Merge topic 'zlib-windows-cross-compile-fix' into release-3.24
67b6f1a09b FindZLIB: fix CMAKE_FIND_LIBRARY_PREFIXES being unset when it was empty

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7647
2022-09-07 09:42:11 -04:00
Brad King
79e37d3d61 Merge branch 'release-3.23' into release-3.24 2022-09-07 09:40:34 -04:00
Brad King
6a2fd8439a Merge topic 'findCUDAToolkit_declare_deps_for_targets_once' into release-3.24
f0918fe505 FindCUDAToolkit: Correctly state cusolver and cublas dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7633
2022-09-07 09:38:00 -04:00
Marc Chevrier
985b4c82a6 Check link libraries properties: fix performances regression
Fixes: #23939
2022-09-07 15:20:53 +02:00
Marc Chevrier
a47eef32a3 renames method FinalizeTargetCompileInfo() in FinalizeTargetConfiguration(). 2022-09-07 14:23:21 +02:00
Daniel Scharrer
67b6f1a09b FindZLIB: fix CMAKE_FIND_LIBRARY_PREFIXES being unset when it was empty
CMAKE_FIND_LIBRARY_PREFIXES and CMAKE_FIND_LIBRARY_SUFFIXES have
different behavior when undefined and when defined but empty:
Empty means to use an empty prefix/suffix while undefined means to
use a hardcoded default for the platform we are running on.

Unfortunately, set(a ${b}) will undefine a when b is empty,
meaning that when targeting a platform where either of these variables
is empty (e.g. Windows where CMAKE_FIND_LIBRARY_PREFIXES is empty)
the unpatched FindZLIB code ends up unsetting that variable, causing
all subsequent find_library calls to use the hardcoded default
for the runtime platform (e.g. "lib" for CMAKE_FIND_LIBRARY_PREFIXES
on Linux).

On the other hand, set(a "${b}") will always define a to be empty but
defined so we have to do this dance to fully preserve the state of these
variables.
2022-09-06 11:05:23 -04:00
Brad King
5d80d7cb6a Merge branch 'findCUDAToolkit_declare_deps_for_targets_once' into release-3.23
Merge-request: !7633
2022-09-06 09:14:57 -04:00
Craig Scott
aa4da6944e Merge topic 'truncation_test' into release-3.24
cb55d5e730 RunCMakeTest: fix Truncation test definition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7632
2022-09-06 08:35:55 -04:00
Craig Scott
b3f106b330 Merge topic 'help-windows-registry' into release-3.24
5b30ca2436 Help: cmake-developer: Add section for Windows registry access.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7642
2022-09-06 08:33:00 -04:00
Craig Scott
6fcdd5adcf Merge topic 'doc-fetchcontent-gtest-example' into release-3.24
daa2a6cda6 Help: Fix wrong casing of GTest in FetchContent integration example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7644
2022-09-05 08:20:23 -04:00
Frank Winklmeier
cb55d5e730 RunCMakeTest: fix Truncation test definition
The `ctest_test` and `CTestCommandLine` truncation tests had multiple problems:
- escape expected result string to avoid regex matching
- specify the truncation size
- pass the truncation mode correctly into the test definition
- use unique test names

Issue: #23868
2022-09-05 13:42:40 +02:00
Marc Chevrier
5b30ca2436 Help: cmake-developer: Add section for Windows registry access.
Fixes: #23905
2022-09-04 16:06:01 +02:00
Craig Scott
0e7bb4e783 Merge topic 'ExternalProject-default-git-tag' into release-3.24
2a21555ea7 ExternalProject: note the default of `GIT_TAG` being `master`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7631
2022-09-04 09:35:14 -04:00
Craig Scott
daa2a6cda6 Help: Fix wrong casing of GTest in FetchContent integration example 2022-09-04 17:18:09 +10:00
Robert Maynard
f0918fe505 FindCUDAToolkit: Correctly state cusolver and cublas dependencies
Fixes #23920
2022-09-02 12:24:40 -04:00
Ben Boeckel
2a21555ea7 ExternalProject: note the default of GIT_TAG being master
Reported on Discourse:

    https://discourse.cmake.org/t/fetchcontent-makeavailable-invalid-reference-master/6386
2022-09-02 08:20:53 -04:00
Brad King
6dd6f91117 Merge topic 'FindPostgreSQL-brew' into release-3.24
f799e0f23d FindPostgreSQL: Add brew-style directories to search path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7627
2022-09-01 09:59:28 -04:00
Brad King
85d29b7de1 Merge topic 'Link-MACOSX_BUNDLE' into release-3.24
f5a441a616 Xcode: Fix erroneous MACOSX_BUNDLE link

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7624
2022-09-01 09:58:16 -04:00
parkesb
f799e0f23d FindPostgreSQL: Add brew-style directories to search path
As of 14.5, homebrew names PostgreSQL directories with the version
number, e.g., `postgresql@14`.
2022-08-31 10:37:13 -04:00
Marc Chevrier
f5a441a616 Xcode: Fix erroneous MACOSX_BUNDLE link
Refactoring in commit a2cfa2da4f (GenEx/LINK_LIBRARY: Add features for
framework support on Apple, 2022-02-10, v3.24.0-rc1~661^2) accidentally
removed a `GetParentDirectory` call.  Restore it.

Fixes: #23891
2022-08-31 09:52:38 -04:00
Brad King
3aebeb1b55 Merge topic 'CMAKE_FIND_USE_INSTALL_PREFIX-support-staging-prefix' into release-3.24
0fc10bb19b CMAKE_FIND_USE_INSTALL_PREFIX considers CMAKE_STAGING_PREFIX
43d31c5198 cmFindBase: Refactor CMAKE_FIND_USE_INSTALL_PREFIX handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7623
2022-08-31 09:39:51 -04:00
Brad King
90aef0b92a Merge topic 'test-symlinks-with-ccache' into release-3.24
d3ac4e8246 Tests: Teach RunCMake.SymlinkTrees to tolerate CCACHE_BASEDIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7622
2022-08-31 09:38:50 -04:00
Brad King
209af8f9a5 Merge topic 'doc-CMP0134-fixes' into release-3.24
7dca3807f8 Help: Fix typos, grammar and formatting in CMP0134 policy docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7620
2022-08-31 09:37:45 -04:00
Brad King
b8409fb1bc Merge topic 'automoc-silence-warnings' into release-3.24
fc8628389f automoc: avoid more compiler warnings in linker-warning-silencing code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7617
2022-08-31 09:35:57 -04:00
Brad King
35e73f513b Merge topic 'FindBoost-1.80' into release-3.24
468a995346 FindBoost: Add support for Boost 1.80

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: مهدي شينون (Mehdi Chinoune) <mehdi.chinoune@hotmail.com>
Merge-request: !7600
2022-08-31 09:29:49 -04:00
Robert Maynard
0fc10bb19b CMAKE_FIND_USE_INSTALL_PREFIX considers CMAKE_STAGING_PREFIX
Fixes #23900
2022-08-30 17:52:40 -04:00
Brad King
d3ac4e8246 Tests: Teach RunCMake.SymlinkTrees to tolerate CCACHE_BASEDIR
If the test is driven with a `ccache`-wrapped compiler then
the `CCACHE_BASEDIR` environment variable might break paths
the test checks.

Fixes: #23885
2022-08-30 16:41:20 -04:00
Robert Maynard
43d31c5198 cmFindBase: Refactor CMAKE_FIND_USE_INSTALL_PREFIX handling 2022-08-30 15:26:30 -04:00
Albert Astals Cid
fc8628389f automoc: avoid more compiler warnings in linker-warning-silencing code
Revise the approach from commit 844244ccdc (automoc: avoid compiler
warnings in linker-warning-silencing code, 2022-08-10, v3.24.1~6^2)
to avoid `-Wmissing-declarations` warnings too.

Issue: #23823
2022-08-30 15:21:12 -04:00
Craig Scott
7dca3807f8 Help: Fix typos, grammar and formatting in CMP0134 policy docs 2022-08-30 15:11:09 -04:00
Kargatum
468a995346 FindBoost: Add support for Boost 1.80
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_80_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.80.0 source tree.
They are the same as 1.79's dependencies, so just update
the version check for warning about newer versions.
2022-08-30 13:46:22 -04:00
Craig Scott
9b4efcb92f Merge topic 'correct_cupti_search_paths' into release-3.24
1f3c3589f1 FindCUDAToolkit: Search the cuda toolkit include path for cupti

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7608
2022-08-26 06:50:39 -04:00
Kyle Edwards
32e6ee29d7 Merge topic 'file-set-source-group' into release-3.24
970052fedd FILE_SET: Fix source group detection
bcc3965813 Tests: Fix VS10Project SourceGroupTreeCMakeLists check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7609
2022-08-25 09:14:20 -04:00
Kyle Edwards
970052fedd FILE_SET: Fix source group detection
Call MatchChildrenFiles() instead of MatchesFiles() in order to
account for files being in subgroups of source groups.

Fixes: #23880
2022-08-24 16:07:24 -04:00
Kyle Edwards
bcc3965813 Tests: Fix VS10Project SourceGroupTreeCMakeLists check
Fix an `IN LISTS` loop, fix a variable check, and escape backslashes
in the regex used to search for source group names.
2022-08-24 16:07:24 -04:00