Commit Graph

59226 Commits

Author SHA1 Message Date
Kitware Robot
cca1b333be CMake Nightly Date Stamp 2022-09-22 00:01:10 -04:00
Matthew Woehlke
aac542f2f1 try_run: Remove PROJECT support
Remove PROJECT support from try_run; it was never tested, has never been
documented, and it's unclear how it should even work (since CMake
wouldn't know what executable to run).
2022-09-21 15:38:06 -04:00
Vicente Adolfo Bolea Sanchez
df377a22dd CMakeDependentOption: allow in depends the use of . 2022-09-21 13:19:45 -04:00
Brad King
79c9e65709 Merge branch 'release-3.24' 2022-09-21 10:46:03 -04:00
Brad King
dff8c76ada Merge branch 'release-3.23' 2022-09-21 10:46:01 -04:00
Brad King
dbf9823d37 Merge branch 'release-3.23' into release-3.24 2022-09-21 10:45:41 -04:00
Marc Chevrier
0bd3efffbc Genex LINK_LIBRARY: Add support for framework with postfix 2022-09-21 16:14:36 +02:00
Brad King
2ce95133d6 Merge branch 'release-3.24' 2022-09-21 10:12:11 -04:00
Brad King
ef1d34b20d Merge topic 'parse-large-int'
8fc822e13a file: Avoid strange istringstream crash in cmake.org binaries on Alpine Linux
31f158e4c8 cmStringAlgorithms: Add functions to parse strings to long long integers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7698
2022-09-21 10:12:11 -04:00
Brad King
3e20442246 Merge topic 'parse-large-int' into release-3.24
8fc822e13a file: Avoid strange istringstream crash in cmake.org binaries on Alpine Linux
31f158e4c8 cmStringAlgorithms: Add functions to parse strings to long long integers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7698
2022-09-21 10:12:10 -04:00
Brad King
a50346c1d0 Merge topic 'swift-mix-cxx'
f6ff19cc9d Tests: Add mixed Swift+CXX source test case
399343486f Tests: Add swift compiler version to test check
a9509cec7e Ninja: Fix mixed Swift/CXX library target generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7679
2022-09-21 08:19:05 -04:00
مهدي شينون (Mehdi Chinoune)
d34e5a98b8 LLVMFlang: Add support for Windows 2022-09-21 12:57:16 +01:00
Kitware Robot
4930c36252 CMake Nightly Date Stamp 2022-09-21 00:01:17 -04:00
Brad King
22280bce61 Merge branch 'parse-large-int' into release-3.23
Merge-request: !7698
2022-09-20 15:17:16 -04:00
Brad King
8fc822e13a file: Avoid strange istringstream crash in cmake.org binaries on Alpine Linux
Somehow using `istringstream` and `operator >>` to parse an integer
crashes on Alpine Linux, at least when compiled with the settings we use
for the official `cmake.org` Linux binaries.  Since commit fd0c285b12
(file: Fix types of the OFFSET and LIMIT arguments, 2022-01-04,
v3.23.0-rc1~133^2), this causes the `file(READ)` command to crash when
parsing its `LIMIT` or `OFFSET` argument.  Parse the input string with
our dedicated helper to avoid the crash.

Fixes: #23872
2022-09-20 12:00:08 -04:00
Brad King
31f158e4c8 cmStringAlgorithms: Add functions to parse strings to long long integers 2022-09-20 12:00:08 -04:00
Brad King
fc17277bda Merge topic 'detect-lib_foo.a-msvc'
be848a71b0 MSVC: Teach find_library to consider the 'libfoo.a' naming convention

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7694
2022-09-20 09:12:57 -04:00
Brad King
396ed90aa1 Merge topic 'help-byproducts'
37381506dc Help: Link from add_custom_target to policy on BYPRODUCTS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7695
2022-09-20 08:55:47 -04:00
Brad King
b15ddc766c Merge topic 'try_compile-more-consistent-errors'
30a234d275 try_compile: Improve error message consistency

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7696
2022-09-20 08:54:22 -04:00
Kitware Robot
245f6ad0f3 CMake Nightly Date Stamp 2022-09-20 00:01:15 -04:00
Evan Wilde
f6ff19cc9d Tests: Add mixed Swift+CXX source test case
This test ensures we can configure and build mixed source binaries. The
test configures, but fails to verify due to multiple targets emitting
the `lib.c.o` and `lib.cpp.o` outputs. Both the clang build step and the
swift link step report that they emit the `lib.c.o` and `lib.cpp.o`
outputs. The `.o`'s are emitted by clang, not by swift.
2022-09-19 11:37:48 -07:00
Evan Wilde
399343486f Tests: Add swift compiler version to test check
Include the swift compiler version in the set of exported variables from
CheckSwift.cmake for Swift related tests.
2022-09-19 11:37:48 -07:00
Hinell
37381506dc Help: Link from add_custom_target to policy on BYPRODUCTS
Link policy explaining BYPRODUCTS.

Apply the change from commit 00b788e85e (Help:custom_command: link
policy on BYPRODUCTS, 2022-09-09) to `add_custom_target` docs too.

Issue: #23786
2022-09-19 12:39:29 -04:00
Yonggang Luo
be848a71b0 MSVC: Teach find_library to consider the 'libfoo.a' naming convention
When targeting the GNU ABI, we consider `.a` libraries first but also
accept `.lib`.  For symmetry, when targeting the MSVC ABI, we now
consider `.lib` first but also accept `.a`.

This adds support for meson-generated static libraries, which are named
with the pattern `lib${foo}.a`:

* https://mesonbuild.com/FAQ.html#why-does-building-my-project-with-msvc-output-static-libraries-called-libfooa

Fixes: #23975
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
2022-09-19 11:02:44 -04:00
Brad King
620cf9efa7 Merge topic 'use-new-project-try_compile'
d00d8537f6 Modules: Use new keyword-dispatched try_compile signature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7690
2022-09-19 10:25:26 -04:00
Brad King
71cfcbe816 Merge topic 'transitive-usage-reqs-lnks'
3d31f99b74 Help: Link from usage requirement commands to detailed explanation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7653
2022-09-19 10:24:15 -04:00
Brad King
e9d9cd348c Merge topic 'help-add-custom-comman-byproducts'
00b788e85e Help:custom_command: link policy on BYPRODUCTS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7662
2022-09-19 10:23:02 -04:00
Brad King
6949d0195d Merge topic 'android-clang-no-ndk-version'
1c86e397fe Android/Clang: Tolerate undefined CMAKE_ANDROID_NDK_VERSION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7689
2022-09-19 10:22:15 -04:00
Brad King
f485e2c65b Merge topic 'env-tls-certs'
10bf34a2d9 cmCurl: Honor OpenSSL certificate environment variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7670
2022-09-19 10:21:22 -04:00
Brad King
10afb5eb87 Merge branch 'release-3.24' 2022-09-19 10:19:12 -04:00
Brad King
689eb0c306 Merge topic 'matlab-r2022b'
edbdfba3f5 FindMatlab: add R2022b 9.13 version map

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7683
2022-09-19 10:19:12 -04:00
Brad King
27a05e84e2 Merge topic 'matlab-r2022b' into release-3.24
edbdfba3f5 FindMatlab: add R2022b 9.13 version map

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7683
2022-09-19 10:19:11 -04:00
Brad King
ea792d5812 Merge topic 'add-try_compile-test-documentation'
e933fccc7e Tests: document try_{compile,run} old/new signature testing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7681
2022-09-19 10:18:04 -04:00
Brad King
33f314764d Merge topic 'improve-try_compile-arg-error'
f976800577 try_compile: More useful error if insufficient arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7682
2022-09-19 10:17:02 -04:00
Kitware Robot
40af69a106 CMake Nightly Date Stamp 2022-09-19 00:01:23 -04:00
Kitware Robot
9bdeaa79e2 CMake Nightly Date Stamp 2022-09-18 00:01:11 -04:00
Kitware Robot
c364068a81 CMake Nightly Date Stamp 2022-09-17 00:01:16 -04:00
Matthew Woehlke
30a234d275 try_compile: Improve error message consistency
Tweak some error messages from try_compile (and try_run) to be more
consistent with each other.
2022-09-16 15:29:35 -04:00
Matthew Woehlke
d00d8537f6 Modules: Use new keyword-dispatched try_compile signature
Modify modules that ship with CMake and use the project flavor of
try_compile to use the new signature added by commit 56ae40cc59
(try_compile: Add PROJECT keyword-dispatched signature, 2022-09-14).
2022-09-16 13:14:51 -04:00
Hinell
3d31f99b74 Help: Link from usage requirement commands to detailed explanation
Augment vague mentions of "Transitive Usage Requirements" with links to
a detailed explanation.

Fixes: #23799
2022-09-16 10:54:27 -04:00
Hinell
00b788e85e Help:custom_command: link policy on BYPRODUCTS
Link policy explaining BYPRODUCTS.

Fixes: #23786
2022-09-16 10:50:46 -04:00
Evan Wilde
a9509cec7e Ninja: Fix mixed Swift/CXX library target generation
With how things were before, mixed Swift/C++ libraries would result in a
broken ninja file.  `cpp.cpp.o` was emitted by the compiler, but was
also being included in the `linkBuild.Outputs` list, so it was being
emitted by multiple targets.

The fix checks that the source language is Swift before adding it to the
list of additional outputs. If it is Swift, this isn't a problem. If it
isn't Swift, we don't include it in the list of outputs.

On the other side, the C++ file was also being passed as a source file,
which the Swift compiler can't compile. So we add the C++ object file as
an explicit dependency and the object file is then added to the list of
Swift sources.
2022-09-16 10:41:39 -04:00
Boris Egorov
1c86e397fe Android/Clang: Tolerate undefined CMAKE_ANDROID_NDK_VERSION
The previous fix for #21772, commit 005e2cdfb0 (Android: Do not use gold
for ndk >= r22, 2021-02-26, v3.20.0-rc3~1^2), doesn't work with typical
android toolchain file, like this one:

    https://android.googlesource.com/platform/ndk/+/master/build/cmake/android-legacy.toolchain.cmake

The condition fails to work when CMAKE_ANDROID_NDK_VERSION is undefined:
second part evaluates to true, although ndk version is not known.

I've encountered following environment where CMAKE_ANDROID_NDK_VERSION
is used without definition:

* Build uses android toolchain file, which sets CMAKE_SYSTEM_VERSION=1
  and doesn't set CMAKE_ANDROID_NDK_VERSION.
* Code in Platform/Android-Determine.cmake exits early when it detects
  toolchain usage (via value CMAKE_SYSTEM_VERSION=1). This file is the
  only place in cmake modules where variable CMAKE_ANDROID_NDK_VERSION
  is set, and by early return we skip this definition.
2022-09-16 10:36:58 -04:00
Michael Hirsch
edbdfba3f5 FindMatlab: add R2022b 9.13 version map 2022-09-16 10:29:19 -04:00
Brad King
3436858697 Merge topic 'try_compile-new-project-signature'
56ae40cc59 try_compile: Add PROJECT keyword-dispatched signature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7677
2022-09-16 10:26:27 -04:00
Brad King
ed8e860998 Merge topic 'xcode-lib-dirs'
d4cc39842e Xcode: Do not append per-config suffixes to library search paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7672
2022-09-16 10:25:14 -04:00
Brad King
95d54eef45 Merge topic 'fphsa-no-version-var'
07f0a78874 FPHSA: Fix regression when VERSION_VAR is missing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7680
2022-09-16 10:23:50 -04:00
Kyle Edwards
24ee97edf5 Merge topic 'cmake-presets-package-clear'
ec8b67918c cmCMakePresetsGraph: Clear package presets in ClearPresets()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7688
2022-09-16 09:51:50 -04:00
Kyle Edwards
a638dff7b3 Merge topic 'cmake-presets-list-error-message'
e7087308ce cmake --list-presets: List package as a valid option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7684
2022-09-16 09:51:13 -04:00
Maxim Cournoyer
10bf34a2d9 cmCurl: Honor OpenSSL certificate environment variables
Honor the OpenSSL environment variables used to specify the location of
the TLS certificates, as specified in the `curl(1)` man page.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-09-16 09:40:28 -04:00