Commit Graph

60098 Commits

Author SHA1 Message Date
Brad King af937d2933 Merge topic 'try_compile-copy-config'
80fc564dd7 try_compile: Restore COPY_FILE with CMAKE_TRY_COMPILE_CONFIGURATION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !7948
2022-11-23 07:09:10 -05:00
Brad King a195dd2a6c Merge branch 'release-3.25' 2022-11-23 07:08:02 -05:00
Brad King 7c462e36c9 Merge topic 'XCode-XCODE_LINK_BUILD_PHASE_MODE-and-LINK_LIBRARY-genex'
61075d2d7b XCode: ensure LINK_LIBRARY genex is usable with XCODE_LINK_BUILD_PHASE_MODE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7947
2022-11-23 07:08:01 -05:00
Brad King 3bb47e43f0 Merge topic 'XCode-XCODE_LINK_BUILD_PHASE_MODE-and-LINK_LIBRARY-genex' into release-3.25
61075d2d7b XCode: ensure LINK_LIBRARY genex is usable with XCODE_LINK_BUILD_PHASE_MODE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7947
2022-11-23 07:08:00 -05:00
Kitware Robot 7c39301ebf CMake Nightly Date Stamp 2022-11-23 00:01:14 -05:00
Brad King 80fc564dd7 try_compile: Restore COPY_FILE with CMAKE_TRY_COMPILE_CONFIGURATION
Since commit 0c141b0393 (try_compile: Record output location instead of
reverse computing it, 2022-08-31, v3.25.0-rc1~154^2) we always look for
the "Debug" configuration's output binary from the test project.
Restore looking for the `CMAKE_TRY_COMPILE_CONFIGURATION`.

Fixes: #24180
2022-11-22 11:26:28 -05:00
Marc Chevrier 61075d2d7b XCode: ensure LINK_LIBRARY genex is usable with XCODE_LINK_BUILD_PHASE_MODE
Fixes: #24176
2022-11-22 16:44:45 +01:00
Brad King 1f9ee2b8df Merge branch 'release-3.25' 2022-11-22 09:51:59 -05:00
Brad King a27663621f Merge topic 'cxxmodules-doc-msvc-modmapfmt'
19fc1ba630 Help/dev/experimental: document the `msvc` module map format

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7944
2022-11-22 09:51:59 -05:00
Brad King 3d1f91a245 Merge topic 'cxxmodules-doc-msvc-modmapfmt' into release-3.25
19fc1ba630 Help/dev/experimental: document the `msvc` module map format

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7944
2022-11-22 09:51:58 -05:00
Brad King e1b757602c Merge topic 'find_dependency-dedup'
fb9a3d0c7d find_dependency: Avoid repeating identical dependency searches
5fbda0f572 find_dependency: Unset temporary variables before returning
591b75ee17 Tests: Add case covering transitive find_dependency calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7936
2022-11-22 09:50:12 -05:00
Brad King 1f6a6d6aad Merge topic 'use-rsp-in-makefiles'
b1a3a38e03 Makefiles: Name object response files with .rsp extension

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: kossnikita <kossnikita@gmail.com>
Merge-request: !7942
2022-11-22 09:48:53 -05:00
Brad King 62172b4ab7 Merge topic 'custom-command-comment-genex'
26d813092b add_custom_{command,target}: add genex support for COMMENT
60a5a39022 cmCustomCommandGenerator: refactor GetComment to return std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7887
2022-11-22 09:47:59 -05:00
Brad King a449a840bd Merge topic 'opencl_framework'
2e2c1e3ea5 OpenCL: Do not assume that OpenCL framework is always used in Apple

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7941
2022-11-22 09:46:35 -05:00
Brad King 40cb52bc9d Merge branch 'release-3.25' 2022-11-22 09:45:23 -05:00
Brad King 3f0fbff9a3 Merge topic 'FindCUDA-nppicom'
3ddfdc38eb FindCUDA: Do not use CUDA_nppicom_LIBRARY in CUDA 11.0+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7938
2022-11-22 09:45:22 -05:00
Brad King 0a802d0f9e Merge topic 'FindCUDA-nppicom' into release-3.25
3ddfdc38eb FindCUDA: Do not use CUDA_nppicom_LIBRARY in CUDA 11.0+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7938
2022-11-22 09:45:21 -05:00
Kitware Robot 9278ae6f1b CMake Nightly Date Stamp 2022-11-22 00:01:17 -05:00
Ben Boeckel 19fc1ba630 Help/dev/experimental: document the msvc module map format 2022-11-21 18:20:46 -05:00
Felipe Torrezan b1a3a38e03 Makefiles: Name object response files with .rsp extension
This is more consistent with the Ninja generator, and is necessary
for the IAR linker to recognize the argument as a response file.

Fixes: #24165
2022-11-21 10:29:24 -05:00
Brad King dae70fa7e8 Merge topic 'help-remove-self-reference-links'
eb77695e25 Help: clean up some minor typos
c36910476a Help: remove links from pages to themselves
391c53a851 Help/prop_tgt/LINK_OPTIONS: fix `:genex:` reference
de4909ea16 Help: fix some minor markup errors
c42c77b020 Help/CMAKE_GLOBAL_AUTORCC_TARGET_NAME: fix link reference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7940
2022-11-21 10:07:07 -05:00
Brad King e69251c828 Merge topic 'xcode-ios-extensionkit'
b99c386122 Xcode: Allow bundling extensionkit extensions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7900
2022-11-21 10:06:20 -05:00
Brad King 55e3168dc4 Merge topic 'lang-std-flag-order'
a1c20b08b4 cmLocalGenerator: Inline AddCompilerRequirementFlag in only call site
914571a042 Place language standard flags just after CMAKE_<LANG>_FLAGS
ad16ae5c70 VS: Recognize -std: flag in CMAKE_C_FLAGS in target with C++ sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7931
2022-11-21 10:03:35 -05:00
Brad King 973d88c25f Merge topic 'clang-tidy-module-cmstrlen-check-sizeof'
830eed374d CMake: fix sizeof string literal violations
c6368a23fe clang-tidy module: look for sizeof string literal in cmStrLen() check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7927
2022-11-21 10:01:14 -05:00
Brad King fa7afe5eb3 Merge topic 'cxx-scanning-properties'
a02d792c6e cxxmodules: add properties to control scanning
008c09d6db cmNinjaTargetGenerator: factor out determining the fileset of a source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7935
2022-11-21 10:00:12 -05:00
Brad King 38660bfc20 Merge topic 'test-file-download'
28513a5fba Tests: Honor CMake_TEST_NO_NETWORK in RunCMake.file-DOWNLOAD
52b9c7b958 Tests: Move CMake.FileDownload cases into RunCMake.file-DOWNLOAD
9dda7c276c Tests: Factor out common helper in RunCMake.file-DOWNLOAD cases
d6af54c473 Tests: Factor out a RunCMake.file-DOWNLOAD test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7937
2022-11-21 09:52:29 -05:00
Brad King 2a06f3ca03 Merge topic 'ci-flang'
99370e990e gitlab-ci: add jobs to test with Clang and LLVMFlang on Fedora

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !7939
2022-11-21 09:48:48 -05:00
Kitware Robot a0dbfb99aa CMake Nightly Date Stamp 2022-11-21 00:01:15 -05:00
Isuru Fernando 2e2c1e3ea5 OpenCL: Do not assume that OpenCL framework is always used in Apple 2022-11-20 14:19:27 -06:00
Kitware Robot 55c7a1f1ad CMake Nightly Date Stamp 2022-11-20 00:01:07 -05:00
Peter Würth 26d813092b add_custom_{command,target}: add genex support for COMMENT
Evaluate and expand generator expressions in the `COMMENT` argument of
the `add_custom_command()` and `add_custom_target()` commands.
This allows to include generator expressions, e.g. a targets location
$<TARGET_...> or the current configuration $<CONFIG>, in the build-time
messages.

Fixes #22507
2022-11-19 13:32:56 +01:00
Peter Würth 60a5a39022 cmCustomCommandGenerator: refactor GetComment to return std::string
Refactoring was done because EvaluateComment leaked memory.
2022-11-19 13:32:56 +01:00
Kitware Robot d8c8e61633 CMake Nightly Date Stamp 2022-11-19 00:01:10 -05:00
Oleksii Udod 3ddfdc38eb FindCUDA: Do not use CUDA_nppicom_LIBRARY in CUDA 11.0+
Extend the change from commit 1d9f2f9714 (FindCUDA: Do not search for
the deprecated nppicom when CUDA >= 11, 2020-06-22, v3.18.0-rc3~14^2)
to also not use the `CUDA_nppicom_LIBRARY` variable.

Issue: #20845
2022-11-18 15:25:05 -05:00
Russell Greene b99c386122 Xcode: Allow bundling extensionkit extensions
Fixes: #24150
2022-11-18 13:58:03 -06:00
Ben Boeckel eb77695e25 Help: clean up some minor typos 2022-11-18 14:11:04 -05:00
Ben Boeckel c36910476a Help: remove links from pages to themselves
At least the top-reference links. Internal `:ref:` usages have been left
intact.
2022-11-18 14:09:32 -05:00
Ben Boeckel 391c53a851 Help/prop_tgt/LINK_OPTIONS: fix :genex: reference 2022-11-18 14:09:09 -05:00
Ben Boeckel de4909ea16 Help: fix some minor markup errors 2022-11-18 14:09:08 -05:00
Brad King a1c20b08b4 cmLocalGenerator: Inline AddCompilerRequirementFlag in only call site
The call site in `AddLanguageFlags` is now the "one true place" for
adding language standard flags.  Inline the helper to reduce risk of
adding other call sites later.
2022-11-18 11:44:52 -05:00
Brad King 914571a042 Place language standard flags just after CMAKE_<LANG>_FLAGS
Previously we added the language standard flag near the end of all
options, even after those added by `add_compile_options` and friends.
However, on some compilers such as MSVC, the `-std` flag may reset
defaults for flags that precede it on the command line.  Move the
language standard flag to before all other flags that CMake adds for
other abstractions, and before those added by `add_compile_options`.

`CMAKE_<LANG>_FLAGS` should still precede the language flags though,
because they are meant to be treated as language-wide modifications to
the compiler defaults, similar to `$CC $CFLAGS`.

Fixes: #23860
Fixes: #24170
2022-11-18 11:44:52 -05:00
Brad King ad16ae5c70 VS: Recognize -std: flag in CMAKE_C_FLAGS in target with C++ sources
Extend commit b325484928 (VS: Fix C language standard in target with C++
sources, 2020-09-28, v3.19.0-rc1~74^2) to account for users placing a
`-std:` flag in `CMAKE_C_FLAGS`.
2022-11-18 11:16:50 -05:00
Ben Boeckel c42c77b020 Help/CMAKE_GLOBAL_AUTORCC_TARGET_NAME: fix link reference 2022-11-18 10:47:39 -05:00
Brad King fb9a3d0c7d find_dependency: Avoid repeating identical dependency searches
Since commit 37da6af17d (find_dependency: Always search dependencies,
2019-03-29, v3.15.0-rc1~301^2) we search for a package every time it is
encountered in the transitive dependency graph traversal, even if it has
been found before.  This was done in case a new visit to a given package
requests different components than a previous visit.  However, it also
causes a lot of repeat processing that is unnecessary in the common case
that all calls share the same set of components (often none).

Restore the logic to avoid repeating the search for an already-found
package.  Handle differences in components by de-duplicating based on
the complete `find_package` call arguments.

Fixes: #23685
2022-11-18 10:31:19 -05:00
Brad King 5fbda0f572 find_dependency: Unset temporary variables before returning 2022-11-18 10:31:19 -05:00
Brad King 591b75ee17 Tests: Add case covering transitive find_dependency calls
Issue: #23685
2022-11-18 10:31:19 -05:00
Brad King 4391808712 Merge topic 'file-COPY_FILE-retry'
d34986036f ExternalData: Improve robustness on Windows to copy a data object to a file
efa9eec040 file(COPY_FILE): Add option to retry on Windows if input access fails
fa518188d8 cmSystemTools: Remove unused CopySingleFile overload

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7934
2022-11-18 09:40:13 -05:00
Kyle Edwards 830eed374d CMake: fix sizeof string literal violations 2022-11-18 09:37:58 -05:00
Kyle Edwards c6368a23fe clang-tidy module: look for sizeof string literal in cmStrLen() check 2022-11-18 09:37:58 -05:00
Brad King 0784261a68 Merge topic 'clang-tidy-module-pragma-once-check'
91a7c0b51c CMake: fix violations of #pragma once check
aa0c99c55c clang-tidy module: add test for #pragma once check
c9af6f2ff6 clang-tidy module: add #pragma once check
68a4d97da7 clang-tidy module: allow header files in test cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !7933
2022-11-18 09:35:21 -05:00