Commit Graph

56227 Commits

Author SHA1 Message Date
Brad King 1b97f8f35c Tests: Clarify RunCMake.CommandLine ExplicitDirs case names 2022-03-02 10:53:41 -05:00
Brad King 352ea99bba CMake 3.23.0-rc2 v3.23.0-rc2 2022-02-23 09:22:31 -05:00
Brad King bc0d7c19db Merge topic 'update-expat' into release-3.23
07f9ce4f8c Merge branch 'upstream-expat' into update-expat
4c031b9417 expat 2022-02-20 (65a21f2b)
9d035ba28d expat: Update script to get Expat 2.4.6

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7015
2022-02-23 09:00:36 -05:00
Brad King 07f9ce4f8c Merge branch 'upstream-expat' into update-expat
# By Expat Upstream
* upstream-expat:
  expat 2022-02-20 (65a21f2b)
2022-02-22 17:11:37 -05:00
Expat Upstream 4c031b9417 expat 2022-02-20 (65a21f2b)
Code extracted from:

    https://github.com/libexpat/libexpat.git

at commit 65a21f2b2a306d29b44e70264aca948aa0454219 (R_2_4_6).
2022-02-22 17:11:37 -05:00
Brad King 9d035ba28d expat: Update script to get Expat 2.4.6 2022-02-22 17:11:28 -05:00
Brad King 2e963c41b4 Merge topic 'cuda-archs' into release-3.23
f75299b803 CUDA: Restore support for non-"all" CUDA_ARCHITECTURES with nvcc 11.5+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7007
2022-02-22 12:56:50 -05:00
Brad King e6a364c999 Merge topic 'CheckTypeSize-doc' into release-3.23
65e4d29e35 CheckTypeSize: Modernize and clarify documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7006
2022-02-22 12:55:54 -05:00
Brad King f75299b803 CUDA: Restore support for non-"all" CUDA_ARCHITECTURES with nvcc 11.5+
Since commit 8f64df0a7c (CUDA: Generic all and all-major support,
2021-12-19, v3.23.0-rc1~23^2), setting `CUDA_ARCHITECTURES` to a value
other than `all` or `all-major` is ignored with NVCC 11.5+.  Fix the
logic to return early only when actually using an "all" value.

Fixes: #23243
2022-02-18 12:54:12 -05:00
Brad King 65e4d29e35 CheckTypeSize: Modernize and clarify documentation
Spell out the list of result variables as a definition list rather
than in prose.

Fixes: #23247
2022-02-18 11:33:06 -05:00
Brad King a1cb448580 Merge topic 'correct_multiple_source_warnings' into release-3.23
7083b19498 cmake: When given multiple source paths use last instead of first

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7001
2022-02-18 09:01:21 -05:00
Brad King ae5f8684f9 Merge topic 'file-set-no-exist' into release-3.23
058b8a0bfb install(): Properly ignore FILE_SETs that don't exist

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7000
2022-02-18 08:57:31 -05:00
Brad King a99c73852e Merge branch 'release-3.22' into release-3.23 2022-02-18 08:54:27 -05:00
Brad King e9832cc298 Merge topic 'test-qt-disable' into release-3.23
5bfff3c750 Tests: Add missing guards on Qt4 and Qt5 tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6998
2022-02-18 08:52:48 -05:00
Brad King abc12c4e96 Merge topic 'libarchive-openssl-crypto-checks' into release-3.23
483a1c248c libarchive: Fix OpenSSL crypto library checks for build inside CMake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6997
2022-02-18 08:51:54 -05:00
Robert Maynard 7083b19498 cmake: When given multiple source paths use last instead of first
When given two source paths via `-S` or just directory paths prefer
the last one. When the paths are mixed always prefer the last `-S`
entry.

Fixes: #23238
2022-02-17 16:54:30 -05:00
Kyle Edwards 058b8a0bfb install(): Properly ignore FILE_SETs that don't exist
Fixes: #22960
2022-02-17 14:43:06 -05:00
Brad King fa9bba4905 Merge branch 'test-qt-disable' into release-3.22
Merge-request: !6998
2022-02-17 11:11:20 -05:00
Brad King 5bfff3c750 Tests: Add missing guards on Qt4 and Qt5 tests
Add missing `CMake_TEST_Qt{4,5}` conditions on Qt4 an Qt5 tests.
Configuring CMake with `-DCMake_TEST_Qt5=OFF` should prevent any
attempt to search for Qt5.

Fixes: #23239
2022-02-17 11:00:25 -05:00
Brad King 9c81f2cb8b Merge topic 'cmake-empty-cmd-line-arg' into release-3.23
f73457ca2e cmake: Ignore any empty "" command line arguments
67f97f5478 Tests: Add RunCMake helper to run cmake with raw execute_process args

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6980
2022-02-17 08:45:52 -05:00
Brad King ed9e7a2732 Merge topic 'test-cuda-sepcomp-ptx' into release-3.23
a7ef59c9c4 Tests: Fix CudaOnly.SeparateCompilationPTX test project name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6991
2022-02-17 08:43:39 -05:00
Brad King 483a1c248c libarchive: Fix OpenSSL crypto library checks for build inside CMake
libarchive's crypto library checks use its `config.h` inside the
`try_compile` project.  Since commit ade3b16e63 (libarchive: Use KWIML
to get fixed-size integer types, 2020-06-01, v3.18.0-rc1~33^2),
that header depends on KWIML inside CMake.  Add the include directory
for KWIML to the crypto library checks.  Otherwise, they always fail
due to not finding the KWIML headers, and libarchive decides not
to link the crypto library.

libarchive has other code besides the hash algorithms that depends on
the crypto library if its ENABLE_OPENSSL option is enabled (which in
CMake is controlled by CMAKE_USE_OPENSSL).  It seems to be missing some
conditions to link the crypto library in those cases, and instead relies
on at least one of the above-mentioned checks to pass.  If they all
fail, and we are using system curl, we might not link the crypto
library.

Fixes: #23234
2022-02-17 08:06:01 -05:00
Robert Maynard f73457ca2e cmake: Ignore any empty "" command line arguments
Don't treat empty quote arguments("") as the current working
directory but instead ignore them.

Fixes #23217
2022-02-16 12:11:33 -05:00
Brad King 67f97f5478 Tests: Add RunCMake helper to run cmake with raw execute_process args 2022-02-16 12:10:19 -05:00
Brad King 368dc57979 Merge topic 'tll-genex-concat' into release-3.23
c1e812ad4f target_link_libraries: Improve tolerance of unquoted generator expressions
5571a31648 target_link_libraries: Handle keyword arguments in dedicated code path
42590df9f9 target_link_libraries: Remove likely-broken ancient compatibility check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6989
2022-02-16 09:47:45 -05:00
Brad King bd575a2918 Merge branch 'release-3.22' into release-3.23 2022-02-16 09:43:48 -05:00
Brad King 809cb5b76a Merge topic 'FindGLUT-link-dirs' into release-3.23
44f7238d5d FindGLUT: Use link directories for libs from pkg-config

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6985
2022-02-16 09:42:53 -05:00
Brad King 1f4976d959 Merge topic 'FindHDF5-info-binary-exists' into release-3.23
449f343498 FindHDF5: Tolerate failure during compiler interrogation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6983
2022-02-16 09:41:57 -05:00
Brad King 319584711c Merge topic 'vs-package-restore-docs' into release-3.23
d92469e572 Help: Clarify how package resolve mode is intended to be used
f320a31087 cmake --build: prioritize --resolve-package-references over preset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6984
2022-02-16 09:41:02 -05:00
Brad King be87b7661c Merge topic 'doc-vs-instance-version' into release-3.23
e163908a76 Help: Clarify version specification in CMAKE_GENERATOR_INSTANCE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6982
2022-02-16 09:38:59 -05:00
Brad King a7ef59c9c4 Tests: Fix CudaOnly.SeparateCompilationPTX test project name
Fix the test added by commit 61b9764b03 (CUDA: Allow both
CUDA_SEPARABLE_COMPILATION and CUDA_PTX_COMPILATION, 2021-09-17,
v3.23.0-rc1~516^2) to have a `project()` name matching what
is passed to CTest's `--build-project` option.  Otherwise, on
VS builds, MSBuild warns:

    MSBUILD : error MSB1009: Project file does not exist.

Other CUDA tests use a matching project name already.
2022-02-16 09:21:59 -05:00
Brad King c1e812ad4f target_link_libraries: Improve tolerance of unquoted generator expressions
Prior to commit 1d709ea2f5 (cmGeneratorTarget: Propagate backtraces from
INTERFACE_LINK_LIBRARIES, 2021-12-15, v3.23.0-rc1~228^2), the value of
`INTERFACE_LINK_LIBRARIES` was a single string.  If an unquoted
generator expression passed to `target_link_libraries` contained `;` and
became multiple arguments, they would all accumulate as a single
`;`-separated list in the value of `INTERFACE_LINK_LIBRARIES`.  Since
that commit, each argument to `target_link_libraries` is placed in
`INTERFACE_LINK_LIBRARIES` as a separate entry, as has long been the
case for `LINK_LIBRARIES`. That behavior change broke projects that were
accidentally relying on accumulation in `INTERFACE_LINK_LIBRARIES` to
produce complete generator expressions containing `;`.

Teach `target_link_libraries` to accumulate consecutive non-keyword
arguments into a single entry before placing them in `LINK_LIBRARIES` or
`INTERFACE_LINK_LIBRARIES`.  For example, treat `a b c` as if they were
written as `"a;b;c"`.  This restores the previously accidental support
for unquoted generator expressions in `INTERFACE_LINK_LIBRARIES`, and
also enables it for `LINK_LIBRARIES`.

For now, do not drop the `target_link_libraries` documentation that
recommends quoting generator expressions.  Quoting is still important to
populate `LINK_LIBRARIES` in CMake 3.22 and below, and is also good
practice to keep generator expressions whole.

Fixes: #23203
2022-02-15 17:38:33 -05:00
Brad King 5571a31648 target_link_libraries: Handle keyword arguments in dedicated code path 2022-02-15 17:17:49 -05:00
Brad King 42590df9f9 target_link_libraries: Remove likely-broken ancient compatibility check
Since commit daa6d2bc04 (ENH: updated handling of debug and optimized
target link libraries, 2006-11-29, v2.6.0~2471) the ancient
`<lib>_LINK_TYPE` compatibility lookup was done using the name of the
dependent target for which `target_link_libraries` is called, rather
than the name of the library dependency being considered.  This code
probably does nothing.  Remove it.
2022-02-15 17:17:49 -05:00
Axel Huebl 449f343498 FindHDF5: Tolerate failure during compiler interrogation
Check that the file that is accessed via `file(STRINGS...)` truly
exists.

This is not the case in some EMSCRIPTEN/WebASM builds where we want to
overwrite the HDF5 find logic manually. The missing check here prevents
that one can overwrite the search logic in exotic environments.
2022-02-15 10:44:29 -05:00
Brad King 3596758811 Merge branch 'FindGLUT-link-dirs' into release-3.22
Merge-request: !6985
2022-02-15 10:37:11 -05:00
Silvio Traversaro 44f7238d5d FindGLUT: Use link directories for libs from pkg-config
Since commit f90d15458a (FindGLUT: Use pkg-config to find flags if
available, 2021-06-11, v3.22.0-rc1~469^2), the `GLUT_LIBRARIES` may come
from `pkg-config`, in which case they may be `-l` flags instead of
absolute paths.  Propagate `GLUT_LIBRARY_DIRS` to GLUT::GLUT too.

Fixes: #23229
2022-02-15 10:35:11 -05:00
Carsten Rudolph d92469e572 Help: Clarify how package resolve mode is intended to be used
Fixes: #23223
2022-02-15 10:20:14 -05:00
Carsten Rudolph f320a31087 cmake --build: prioritize --resolve-package-references over preset
Fixes: #23224
2022-02-15 10:20:02 -05:00
Brad King e163908a76 Help: Clarify version specification in CMAKE_GENERATOR_INSTANCE
Improve the documentation added by commit ec8d37b3b1 (VS: Support
version specification in CMAKE_GENERATOR_INSTANCE, 2021-10-26,
v3.23.0-rc1~452^2~1).

Fixes: #23225
2022-02-15 10:06:12 -05:00
Brad King e5a5f3b76f Merge branch 'release-3.22' into release-3.23 2022-02-15 09:52:42 -05:00
Brad King db5b4f40c3 Merge topic 'FindMatlab-mcr911' into release-3.23
b8d885ed0d FindMatlab: Fix version detection for MCR >= 9.10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6976
2022-02-15 09:50:08 -05:00
Brad King fb925e5443 Merge topic 'doc-example-package-components' into release-3.23
5317015e68 Help: use package-specific var for supported component list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6975
2022-02-15 09:48:27 -05:00
Brad King 9feafb36c0 Merge topic 'doc-no-versioned-soname' into release-3.23
3f7e6b3fd4 Help: Document CMAKE_PLATFORM_NO_VERSIONED_SONAME

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6978
2022-02-15 09:47:34 -05:00
Brad King 1126586f40 Merge topic 'doc-export-command' into release-3.23
19b273b729 Help: Organize and clarify export() command documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6981
2022-02-15 09:46:41 -05:00
Brad King 19b273b729 Help: Organize and clarify export() command documentation
Add section headers for each signature, and a synopsis linking to them.
Re-order sections to introduce the main `export(TARGETS)` functionality
before mentioning the `export(EXPORT)` shorthand, which may be confused
with `install(EXPORT)`.

Fixes: #23221
2022-02-14 12:16:50 -05:00
Ralf Habacker 3f7e6b3fd4 Help: Document CMAKE_PLATFORM_NO_VERSIONED_SONAME
This variable was added by commit 42f74df6d4 (Add basic Android platform
module, 2014-06-06, v3.1.0-rc1~416^2), but was not previously documented.

Fixes: #23227
2022-02-14 10:40:48 -05:00
Brad King a16cefeafe Merge branch 'FindMatlab-mcr911' into release-3.22
Merge-request: !6976
2022-02-14 10:24:51 -05:00
Tom M b8d885ed0d FindMatlab: Fix version detection for MCR >= 9.10
Recent MCR versions have the following `VersionInfo.xml`:

    <version>9.11.0.1837725</version>

Fix parsing of multiple digits in the version components
so that we do not mistake this for version `9.1`.
2022-02-14 10:23:33 -05:00
Connor Imes 5317015e68 Help: use package-specific var for supported component list
Always using `_supported_components` causes conflicts when transitive
dependencies also set this variable, e.g., because the developers
followed these code samples.

An even more general approach could be to set
`_${CMAKE_FIND_PACKAGE_NAME}_supported_components` instead, but such a
change should then be applied to other variables for consistency.

Fixes: #23112
2022-02-14 10:16:52 -05:00