Commit Graph

12817 Commits

Author SHA1 Message Date
Brad King
286a40cb5b Help: Update Sphinx versionadded directives for 3.25 release
Run the script:

    Utilities/Sphinx/update_versions.py --since v3.24.0 --overwrite

Manually de-duplicate the directive in FindOpenSP.
2022-10-07 11:29:00 -04:00
Brad King
c239c71681 Merge topic 'ifw-4.4'
e848ce21c9 CPack/IFW: Add support for QtIFW 4.4

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7750
2022-10-06 08:41:50 -04:00
Erlend E. Aasland
e848ce21c9 CPack/IFW: Add support for QtIFW 4.4
Fixes: #24027
2022-10-05 15:48:08 -04:00
Brad King
15ad39575e Merge topic 'FindGDAL-debug-msvc'
fdc95c6d19 FindGDAL: Add library name for MSVC Debug GDAL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7737
2022-10-04 10:31:02 -04:00
Gregoire Krähenbühl
fdc95c6d19 FindGDAL: Add library name for MSVC Debug GDAL
Search for `gdald.lib`, which is how the library is now named when built
with CMake under MSVC Debug.

Fixes: #24015
2022-10-03 10:52:58 -04:00
Patrick Stewart
e07039cd26 ExternalProject: Explicitly run Git commands on intended directory
Add `--git-dir=.git` to cause git commands to fail instantly if the
`.git` folder has gone missing.

Fixes: #24007
2022-09-30 07:31:49 -04:00
Brad King
b1ecce8ae7 Merge topic 'traversaro-master-patch-54928'
e0a62b84b5 FindGLUT: On Windows and with multiple config generator do not use pkg-config

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7721
2022-09-29 07:54:50 -04:00
Matthew Woehlke
da45136ce3 CMakeTestCXXCompiler.cmake: Improve logging consistency
Use "C++ compiler" rather than "CXX compiler" in certain logging
messages. This improves both internal consistency (as "C++ compiler" was
already used elsewhere) and consistency with e.g. the equivalent logging
for the "Objective-C[++] compiler".
2022-09-28 11:49:01 -04:00
Brad King
381fc36880 Merge topic 'use-try_compile-source-from'
41f7b1169a Modules: Use new SOURCES_FROM_* try_compile (2/2)
db76876db5 Modules: Use new SOURCES_FROM_* try_compile (1/2)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7717
2022-09-28 10:42:05 -04:00
Silvio Traversaro
e0a62b84b5 FindGLUT: On Windows and with multiple config generator do not use pkg-config 2022-09-28 09:40:25 +02:00
Matthew Woehlke
41f7b1169a Modules: Use new SOURCES_FROM_* try_compile (2/2)
Modify some additional modules that ship with CMake to use the new
SOURCES_FROM_* arguments to try_compile / try_run as added by commits
cb14ae2b87 (try_compile: Add SOURCE_FROM_{ARG,VAR}, 2022-09-21) and
611d801790 (try_compile: Add SOURCE_FROM_FILE, 2022-09-22). This covers
modules that need to read and alter a template source file, which were
not addressed in the previous commit.

Note that FindOpenACC.cmake does not actually need configure_file
functionality; it appears to have inherited the (gratuitous) use thereof
from FindOpenMP.cmake, with which its code bears significant similarity.
2022-09-27 13:29:52 -04:00
Matthew Woehlke
db76876db5 Modules: Use new SOURCES_FROM_* try_compile (1/2)
Modify some modules that ship with CMake to use the new SOURCES_FROM_*
arguments to try_compile / try_run as added by commits cb14ae2b87
(try_compile: Add SOURCE_FROM_{ARG,VAR}, 2022-09-21) and 611d801790
(try_compile: Add SOURCE_FROM_FILE, 2022-09-22). This covers users which
previously either used an existing file (but sometimes needed to rename
it), or which wrote out their source in entirety. It does NOT cover
users that actually need configure_file functionality, as those will be
more involved to update and will thus be tackled in part 2.
2022-09-27 13:29:52 -04:00
Brad King
164a156c7c Merge topic 'remove-vs10-generator'
8d6f015d59 Drop Visual Studio 10 2010 generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7718
2022-09-27 10:32:11 -04:00
Brad King
50b668ddc8 Merge topic 'add_subdirectory_system'
2eb30a7036 add_subdirectory: Add SYSTEM option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7399
2022-09-27 10:28:49 -04:00
Brad King
8d6f015d59 Drop Visual Studio 10 2010 generator
This generator has been deprecated since CMake 3.22.  Remove it.
2022-09-26 15:43:04 -04:00
Da Quexian
2eb30a7036 add_subdirectory: Add SYSTEM option
Fixes: #22401
Signed-off-by: Da Quexian <daquexian566@gmail.com>
2022-09-26 10:56:54 -04:00
Brad King
0bbd674cdb Merge topic 'UseSWIG-macos-csharp-suffix'
6b14de6bc5 UseSWIG: Change the library suffix to 'dylib' for C# on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7659
2022-09-26 09:36:32 -04:00
Mario Emmenlauer
6b14de6bc5 UseSWIG: Change the library suffix to 'dylib' for C# on macOS
When testing on macOS, the command `swig_add_library("mytarget")`
creates a library `libmytarget.so` instead of `libmytarget.dylib`.
Subsequently, the library is not found by `dotnet` and the
swig-generated `DllImport` statements.

Fixes: #23967
2022-09-23 09:24:15 -04:00
Brad King
87b9a31489 Merge topic 'modernize-build-self'
9629be8080 Build: Use `CMAKE_CURRENT_XXX_DIR` instead of top dirs
e6fb5a1feb Build: Sort linked libraries list of `CMakeLib`
aa7290e8dc Build: Use imported target `Threads::Threads` instead of variable
df8ad72ffa Build: Use imported target `kwiml::kwiml` instead of variables
eeebf31e54 Build: Use imported target `LibRHash::LibRHash` instead of variables
08be01a181 Build: Use imported target `LibUV::LibUV` instead of variables
ddac6dcbe8 Build: Use imported target `JsonCpp::JsonCpp` instead of variables
ac76c53d33 Build: Use imported target `CURL::libcurl` instead of variables
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7570
2022-09-23 08:46:08 -04:00
Brad King
4281f6ac34 Merge topic 'cdo-consider-dots'
df377a22dd CMakeDependentOption: allow in depends the use of .

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7701
2022-09-23 08:45:11 -04:00
Brad King
d563bfa2df Merge topic 'flang-windows'
d34e5a98b8 LLVMFlang: Add support for Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7692
2022-09-23 08:42:21 -04:00
Alex Turbov
1f5d9c5299 Build: Use imported target LibArchive::LibArchive instead of variables 2022-09-22 10:21:38 -04:00
Vicente Adolfo Bolea Sanchez
df377a22dd CMakeDependentOption: allow in depends the use of . 2022-09-21 13:19:45 -04:00
مهدي شينون (Mehdi Chinoune)
d34e5a98b8 LLVMFlang: Add support for Windows 2022-09-21 12:57:16 +01: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
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
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
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
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
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
07f0a78874 FPHSA: Fix regression when VERSION_VAR is missing
If a package is found but FPHSA is called by the find module without a
`VERSION_VAR`, and the `find_package` call specifies a version, we have
previously accepted the package as found.  This was accidentally
regressed by commit 8f50f135ae (FPHSA: Improve error message when
VERSION_VAR is empty or has been unset(), 2022-08-01).  Restore it and
add a test case.
2022-09-15 11:00:02 -04:00
Brad King
01a25d72c6 Merge topic 'add_tasking_compiler'
94df5b6ef1 Tasking: Add support for several compiler toolsets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7491
2022-09-15 09:19:58 -04:00
Brad King
c3522accd5 Merge topic 'binutils-apple-no-lld'
a54e25b547 BinUtils: Avoid the 'ld.lld' ELF linker on Apple platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7671
2022-09-15 09:07:51 -04:00
Brad King
671509ff27 Merge topic 'FindMatlab-macos-arm64'
f0edac914a FindMatlab: Add MEX binary file suffix for Apple Silicon native Matlab

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7673
2022-09-15 09:05:53 -04:00
Michael Hirsch
f0edac914a FindMatlab: Add MEX binary file suffix for Apple Silicon native Matlab
The Matlab MEX binary file suffix is distinct for Apple Silicon.
2022-09-14 14:05:35 -04:00
Christoph Seitz
94df5b6ef1 Tasking: Add support for several compiler toolsets
Add support for the Tasking compiler toolset:

* TriCore Compiler Toolset 6.3 (with TriCore, ARM, MCS,
  8051 and PCP architecture compilers)
* SmartCode Compiler Toolset 10.1 (with TriCore, ARC, MCS,
  8051 architecture compilers)
* ARM Compiler 6.0
* MCS Complier 3.3
* 8051 Compiler 7.2

Fixes: #23756
2022-09-14 09:58:50 -04:00
Carlo Cabrera
a54e25b547 BinUtils: Avoid the 'ld.lld' ELF linker on Apple platforms
`ld.lld` is an ELF linker, so we should never set `CMAKE_LINKER` to this
when targeting an Apple platform.
2022-09-14 09:34:14 -04:00
Brad King
c3e68020d6 Merge topic 'MsvcDebugInformationFormatAbstraction'
a858466aac MSVC: Add test for debug information format
0e96a20478 MSVC: Add abstraction for debug information format
d4c8111da4 Clang/Windows: Clarify name of internal runtime library flags variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7606
2022-09-14 09:21:27 -04:00
Glen Chung
0e96a20478 MSVC: Add abstraction for debug information format
Replace our hard-coded default for `/Zi` with a first-class abstraction
to select the debug information format an enumeration of logical
names.  We've long hesitated to do this because the idea of "debug
information format" touches on related concepts on several platforms.
Avoid that scope creep by simply defining an abstraction that applies
only when targeting the MSVC ABI on Windows.

Removing the old default flag requires a policy because existing
projects may rely on string processing to edit them and choose a
runtime library under the old behavior.  Add policy CMP0141 to
provide compatibility.

Fixes: #10189
2022-09-14 09:12:47 -04:00
Brad King
e457663ac1 Merge topic 'Windows-Intel-dependencies'
90874a542e Intel classic compilers on Windows: use msvc style dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !7668
2022-09-14 08:14:30 -04:00
Brad King
20f9b6973b Merge topic 'modules-use-new-try_compile-signature'
2edf0fc6d7 Modules: Use new keyword-dispatched try_compile signature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7656
2022-09-14 08:13:27 -04:00
Matthew Woehlke
2edf0fc6d7 Modules: Use new keyword-dispatched try_compile signature
Modify most of the modules that ship with CMake to use the new
try_compile / try_run signatures added by commit aa9220d3a0
(try_compile: Add keyword-dispatched signature, 2022-09-02). This
improves debugging by each invocation using its own directory so that
the results of multiple invocations can be retained.

This does not cover any invocations which provide an entire project, as
that flavor of try_compile has not yet been updated.
2022-09-14 07:52:16 -04:00
Marc Chevrier
90874a542e Intel classic compilers on Windows: use msvc style dependencies
Intel classic compilers generate erroneous dependencies when gcc style
is used with paths containing spaces. So, fall back to the old way to
generate dependencies by using option /showIncludes.

Fixes: #23948
2022-09-13 17:47:01 +02:00
Brad King
d4c8111da4 Clang/Windows: Clarify name of internal runtime library flags variables
Also avoid extra spaces in resulting flag strings.
2022-09-13 11:19:07 -04:00
Brad King
9ffd170d27 Merge topic 'FindMPI-more-robust-conditionals'
08dece8b18 FindMPI: remove unnecessary variable expansions in conditionals
1edc2f337f FindMPI: match full language names when "simplifying"
93b5bdb8b4 FindMPI: quote literal values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7666
2022-09-13 09:49:06 -04:00
Brad King
4aeb887c82 Merge topic 'ExternalProject-cmake-install'
66b5d51f38 ExternalProject: Install CMake projects using 'cmake --install'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7655
2022-09-13 09:47:31 -04:00
Brad King
358a49ef9b Merge topic 'LINUX-host'
caffb15d09 LINUX: Set CMAKE_HOST_LINUX variable when running on a Linux host

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: hinell <al.neodim@gmail.com>
Merge-request: !7661
2022-09-13 09:46:01 -04:00
Harry Mallon
66b5d51f38 ExternalProject: Install CMake projects using 'cmake --install'
In some cases, `cmake --install .` implements additional semantics over
just `cmake --build . --target install`.  For example, using the Xcode
"new build system" with `IOS_INSTALL_COMBINED` requires special support
from `cmake --install` beyond building the `install` target.

Fixes: #23946
2022-09-12 09:53:22 -04:00