Commit Graph

14326 Commits

Author SHA1 Message Date
Brad King
989d2aff39 Merge topic 'tasking-std-flags'
86bc2b000d Tasking: Fix C and C++ compiler extension mode flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9780
2024-08-29 08:36:09 -04:00
Brad King
241f923a6f Drop Visual Studio 12 2013 generator
This generator has been deprecated since CMake 3.28.  Remove it.
2024-08-28 14:13:05 -04:00
Brad King
1ad39a9cf8 UseSWIG: Simplify test for Visual Studio generators
Since commit 03c31b0395 (Drop Visual Studio 9 2008 generator,
2024-05-06, v3.30.0-rc1~134^2), the test does not need to be
version-dependent.
2024-08-28 14:12:41 -04:00
Brad King
86bc2b000d Tasking: Fix C and C++ compiler extension mode flags
In commit 94df5b6ef1 (Tasking: Add support for several compiler
toolsets, 2022-07-20, v3.25.0-rc1~133^2) the extension mode flags were
added with an extra space-only argument.  Remove it.  Also fix the C++98
mode flag that looks like a C mode flag.

Fixes: #26244
2024-08-28 09:48:48 -04:00
Brad King
a818a9afd6 Merge topic 'FindPython-free-threaded-python'
10abd2ac5a FindPython: ensure a usable environment is set for the free threaded Python

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9775
2024-08-27 09:42:38 -04:00
Brad King
74c29b44a9 Merge topic 'doc-libfun'
7a39cfb012 Help Check{Function,Library}Exists refer to CheckSourceCompiles

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9773
2024-08-27 09:41:03 -04:00
Brad King
881e43411a Merge topic 'FindIconv-alpine'
c9f6369c76 FindIconv: Fix finding iconv.h on Alpine Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9774
2024-08-27 09:39:58 -04:00
Brad King
1fdc367421 Merge topic 'doc-flag'
588bab15c4 Help Check*CompilerFlag harmonize text

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9772
2024-08-27 09:37:36 -04:00
Marc Chevrier
10abd2ac5a FindPython: ensure a usable environment is set for the free threaded Python
Define the `Python_DEFINITIONS` variable for the support of free
threaded Python developments on Windows.

This is a complement to commit 9a0dee7257 (FindPython: Add support for
free threaded python, 2024-05-30).
2024-08-27 09:27:35 -04:00
Brad King
1c279c6263 Merge topic 'FindPython-numpy-mkl'
516124ea23 FindPython: fix regression of NumPy detection with Intel MKL library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9776
2024-08-27 09:21:34 -04:00
scivision
7a39cfb012 Help Check{Function,Library}Exists refer to CheckSourceCompiles
help users be aware of more general/robust CheckSourceCompiles
2024-08-26 16:13:34 -04:00
Peter Kokot
c9f6369c76 FindIconv: Fix finding iconv.h on Alpine Linux
Alpine Linux has the `iconv.h` belonging to the builtin `iconv` library
provided by musl C library in the standard directory (`/usr/include`).
However, when installing the GNU libiconv APK package (`gnu-libiconv`),
the GNU `libiconv` library has header located in
`/usr/include/gnu-libiconv` subdirectory.  Fix finding the header
matching the `libiconv` library.

Issue: #24695
2024-08-26 11:02:55 -04:00
Even Rouault
516124ea23 FindPython: fix regression of NumPy detection with Intel MKL library
Fix commit df551ee538 (FindPython: fix NumPy detection when Intel MKL
library is installed, 2024-03-20, v3.30.0-rc1~361^2) by setting
`MKL_ENABLE_INSTRUCTIONS` to `SSE4_2`, but only if
`MKL_ENABLE_INSTRUCTIONS` is not set in the calling environment.

Fixes: #26240
2024-08-26 10:27:55 -04:00
Brad King
7a3961cc94 Merge topic 'android-ndk-27'
24cd4ff844 Android: Fix build with NDK 27

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9766
2024-08-26 09:46:36 -04:00
scivision
588bab15c4 Help Check*CompilerFlag harmonize text
This is like recently done for Check*Source{Compiles,Runs}
2024-08-23 12:30:17 -04:00
Lars Schmertmann
24cd4ff844 Android: Fix build with NDK 27
`NDK_PROC_*_ABI` and `NDK_ARCH_*_ABI` were removed in the Android
NDK 27 but will be reintroduced in the Android NDK 27b:

* https://github.com/android/ndk/issues/2049
* https://android-review.googlesource.com/c/platform/ndk/+/3196345

Both are only used when `CMAKE_ANDROID_ARCH_ABI` is NOT given. But
currently the existence is also checked when `CMAKE_ANDROID_ARCH_ABI`
is given. So we move the checks to the position they are required.
2024-08-22 09:30:01 -04:00
Brad King
4950445d4b Merge topic 'hip-lang-lib64search'
c34d827622 HIP: Ensure lib64 directories are included in hip-lang dependency search

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9741
2024-08-22 09:04:02 -04:00
Brad King
860d9b4f37 Merge topic 'swift-linker-config'
a34756b622 Swift: Fix typo in linker configuration logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9745
2024-08-20 11:46:50 -04:00
Brad King
bf514752af Merge topic 'findwx-link-libs'
bf2a0527cb FindwxWidgets: Add link dependencies for Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9749
2024-08-20 11:44:01 -04:00
Brad King
8734799848 Merge topic 'doc-refer'
759776dcdb Help: Check*SourceRuns make text more concise.
5d42177a06 Help: Check*SourceCompiles, Check*CompilerFlag refer to new command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9743
2024-08-20 11:41:38 -04:00
Brad King
5adcac8e08 Merge topic 'FindJNI-no-xcode'
7402593a08 FindJNI: Improve output on macOS if Xcode is not installed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9750
2024-08-20 11:24:46 -04:00
Saleem Abdulrasool
a34756b622 Swift: Fix typo in linker configuration logic
Fix a typo from commit c1c4cf9545 (Linker configuration: introduce a new
architecture, 2024-06-05): `Swoft` => `Swift`.

Reported-by: Evan Wilde <etceterawilde@gmail.com>
2024-08-19 14:04:38 -04:00
Brad King
7402593a08 FindJNI: Improve output on macOS if Xcode is not installed
Improve the changes from:

* commit efa0e2ddaf (FindJNI: Update for Xcode greater than 12.1 on macOS,
                     2023-08-06, v3.27.2~5^2)
* commit 597139b853 (FindJNI: Restore support for macOS without Xcode,
                     2023-08-11, v3.27.3~8^2)

to avoid leaking `xcodebuild`'s stderr.

Issue: #26229
2024-08-19 11:37:48 -04:00
Brad King
103159fe55 Merge topic 'cpack-iss-utf-8'
e8b9eebd63 CPack/InnoSetup: Template file in UTF-8 BOM to support Unicode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Nikolay Raspopov <raspopov@cherubicsoft.com>
Merge-request: !9740
2024-08-19 10:32:48 -04:00
PB
bf2a0527cb FindwxWidgets: Add link dependencies for Windows
Since wxWidgets v3.3, linking against gdiplus and msimg32
Windows libraries is required.
2024-08-18 20:53:50 +02:00
Michael Hirsch
759776dcdb Help: Check*SourceRuns make text more concise.
Similar simplification was done in !9641 for Check*SourceCompiles
2024-08-15 22:33:55 -04:00
Michael Hirsch
5d42177a06 Help: Check*SourceCompiles, Check*CompilerFlag refer to new command
The CheckSourceCompiles and CheckCompilerFlag would generally be preferred general
command syntax, but users may not realize they exist, so help point them there.
2024-08-15 22:27:17 -04:00
Craig Scott
dd87640a22 CMakeFindFrameworks: Deprecate the module subject to policy CMP0173
Fixes: #20446
2024-08-16 11:10:27 +10:00
Ioannis Assiouras
c34d827622 HIP: Ensure lib64 directories are included in hip-lang dependency search
When the target ABI is unspecified, find_package should include lib64
directories in hip-lang dependency search, regardless of whether hip-lang
is packaged under lib or lib64.

Fixes: #26194
2024-08-15 22:26:23 +01:00
raspopov
e8b9eebd63 CPack/InnoSetup: Template file in UTF-8 BOM to support Unicode 2024-08-15 20:05:21 +03:00
Brad King
a7bc881847 Merge topic 'FindJNI-zero-vm-location'
983291669d FindJNI: Support finding libjvm.so for all OpenJDK variants

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9725
2024-08-15 10:34:26 -04:00
Brad King
e0f12564dc Merge topic 'iar-missing-license'
564d527c04 IAR: Improve error message for missing license

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9723
2024-08-15 09:48:27 -04:00
Brad King
683910854c Merge topic 'UseJava-verbosity'
ea62c44b64 UseJava: Reduce add_jar verbosity by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9710
2024-08-15 09:47:14 -04:00
Brad King
15a94f1d28 Merge topic 'pkg-config'
25b947589a Modules: Guard calls to pkg_check_modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9709
2024-08-15 09:46:01 -04:00
WANG Xuerui
983291669d FindJNI: Support finding libjvm.so for all OpenJDK variants
Formerly only the "client" and "server" variant directories are being
checked for libjvm.so, but according to a 2021 OpenJDK upstream change
present in OpenJDK >= 18, there can be "minimal" and "zero" variants as
well. In particular, formerly (OpenJDK <= 17) the Zero variant had its
libjvm.so in "server/", but "zero/" in newer versions, which regressed
downstream CMake project builds running on systems with OpenJDK Zero VM.

Fix it by checking all 4 variant directories for libjvm.so.

Link: https://bugs.openjdk.org/browse/JDK-8273494
Link: https://github.com/openjdk/jdk/pull/5440
Link: 8fbcc8239a
Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1078446
2024-08-15 09:41:57 -04:00
Felipe Torrezan
564d527c04 IAR: Improve error message for missing license
When using the IAR Compiler without a license, CMake issues a
fatal error message about a missing linker and librarian.
This message is misleading.

In the previous detection, CMakeFindBinUtils.cmake would rely
on information collected from try_compile() which depends on a
working license.

In the new detection scheme, the IAR BinUtils are automatically
detected regardless of an existing license, based solely on the
compiler's path.

The failure point will be when trying to compile a C or a CXX
source file, where there will be no CMAKE_${lang}_COMPILER_VERSION
available.

This change improves the resulting message for when trying to use
the compiler without a license.
2024-08-14 09:03:13 +02:00
Tudy Gourmelen
4b84596dcf Android: Fix condition detecting no APIs found in the NDK
Fixes: #26210
2024-08-14 08:16:24 +02:00
Gold856
ea62c44b64 UseJava: Reduce add_jar verbosity by default
Set "Clean class files" message to verbose.

Fixes: #22107
2024-08-13 15:56:39 -04:00
Brad King
fc0faeb34e Merge topic 'lfortran-link-info'
509e8be784 LFortran: Add support for mixed-language linking with Fortran
cb6e8698ff CMakeParseImplicitLinkInfo: Refactor conditions to detect specific compilers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9700
2024-08-13 10:58:47 -04:00
Kai Pastor
25b947589a Modules: Guard calls to pkg_check_modules
Before calling pkg_check_modules, modules must check PKG_CONFIG_FOUND.
When FindPkgConfig.cmake is loaded, pkg_check_modules is always defined
regardless of pkg-config being present. However, the whole module might
be disabled on user request with CMAKE_DISABLE_FIND_PACKAGE_PkgConfig.
This must not break Find modules which just look for a hint or similar.
2024-08-07 20:11:43 +02:00
Brad King
509e8be784 LFortran: Add support for mixed-language linking with Fortran
Parse implicit link information for this compiler to support
mixed-language linking.  This was missed by commit 98d0f918ba (LFortran:
Add support for this compiler, 2024-01-25). Also activate mixed-language
test cases that would have caught this.

Fixes: #26145
2024-08-02 15:15:02 -04:00
Brad King
cb6e8698ff CMakeParseImplicitLinkInfo: Refactor conditions to detect specific compilers 2024-08-02 15:13:38 -04:00
Brad King
56064c3977 FortranCInterface: Simplify module symbol mangling detection regex
Simplify the change from commit 0f5b6dd215 (FortranCInterface: Add
support for LLVMFlang mangling, 2022-09-09, v3.24.2~2^2).
2024-08-02 14:59:21 -04:00
Brad King
618c60367f Merge topic 'swift-install-names'
8669176576 Swift: Fix INSTALL_NAME_DIR under CMP0157 NEW behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9692
2024-08-02 09:47:51 -04:00
Brad King
35e908e0dc Merge topic 'swift-install-names' into release-3.30
8669176576 Swift: Fix INSTALL_NAME_DIR under CMP0157 NEW behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9692
2024-08-02 09:47:50 -04:00
Evan Wilde
8669176576 Swift: Fix INSTALL_NAME_DIR under CMP0157 NEW behavior
Setting `CMAKE_INSTALL_NAME_DIR` or the `INSTALL_NAME_DIR` on Swift
targets had no effect when CMP0157 was set to `NEW`.  This was a result
of missing the `<TARGET_INSTALLNAME_DIR>` before the `<TARGET_SONAME>`.
Fix that and add a test to verify that the install name directory is
included in the install name.

Fixes: #26175
2024-08-01 10:49:36 -04:00
Jessie Hernandez
cee34d7ab3 FindEXPAT: Implement EXPAT_USE_STATIC_LIBS for non-Windows platforms
In commit 302501ad36 (FindEXPAT: add a EXPAT_USE_STATIC_LIBS hint,
2023-06-19, v3.28.0-rc1~447^2) this flag was introduced but was only
implemented for windows like systems. To make the flag complete and also
behave as you would expect on non-windows systems cmake also looks for
`.a` files now.

Fixes: #26177
2024-07-31 09:48:46 -04:00
Brad King
ce07554967 Merge topic 'enable_warnings'
373b29bd3f Rename {_ => }CMAKE_INCLUDE_SYSTEM_FLAG_${lang}_WARNING

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Acked-by: Marcel Raad <marcel.raad@teamviewer.com>
Merge-request: !9688
2024-07-30 10:13:05 -04:00
Patrick H
373b29bd3f Rename {_ => }CMAKE_INCLUDE_SYSTEM_FLAG_${lang}_WARNING
Although not documented publicly, projects may need to override
this variable.  Remove the private `_` prefix from its name.

Issue: #25103
2024-07-29 11:50:02 -04:00
Brad King
56eb3fb8ac Merge topic 'FindPython-WIN32-EXECUTABLE_DEBUG'
c25df125e1 FindPython: Fix usage of cached variable _Python_EXECUTABLE_DEBUG

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Hillel Sims <hsims1@bloomberg.net>
Merge-request: !9686
2024-07-29 11:01:38 -04:00