Commit Graph

12719 Commits

Author SHA1 Message Date
Brad King
8c6794abc7 Merge topic 'ctest-target-alias-args'
a79ccf7188 CTestTargets: Include CMAKE_CTEST_ARGUMENTS in CTEST_TEST_TARGET_ALIAS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7615
2022-08-31 09:46:40 -04:00
Brad King
6a7c60f3a3 Merge topic 'FindOpenGL-clarify-output'
3a3ecef473 FindOpenGL: Fix confusing output with CMP0072 and OpenGL preference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7604
2022-08-31 09:44:48 -04:00
Brad King
f7fc864c3a Merge topic 'FindOpenSP-module'
e706da5f7e FindOpenSP: Add module to find the OpenSP library
4bcdf1b992 ci: add OpenSP to Debian and Fedora base images

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7470
2022-08-31 09:42:07 -04:00
Brad King
b9371c0477 Merge topic 'CMAKE_FIND_USE_INSTALL_PREFIX-support-staging-prefix'
0fc10bb19b CMAKE_FIND_USE_INSTALL_PREFIX considers CMAKE_STAGING_PREFIX
43d31c5198 cmFindBase: Refactor CMAKE_FIND_USE_INSTALL_PREFIX handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7623
2022-08-31 09:39:52 -04:00
Brad King
33a51cdf1d Merge topic 'FindBoost-1.80'
468a995346 FindBoost: Add support for Boost 1.80

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: مهدي شينون (Mehdi Chinoune) <mehdi.chinoune@hotmail.com>
Merge-request: !7600
2022-08-31 09:29:51 -04:00
Robert Maynard
0fc10bb19b CMAKE_FIND_USE_INSTALL_PREFIX considers CMAKE_STAGING_PREFIX
Fixes #23900
2022-08-30 17:52:40 -04:00
Cody Martin
a79ccf7188 CTestTargets: Include CMAKE_CTEST_ARGUMENTS in CTEST_TEST_TARGET_ALIAS
Extend the change from commit 4153d8445b (Add CMAKE_CTEST_ARGUMENTS
variable to pass command-line arguments to ctest, 2019-12-28,
v3.17.0-rc1~150^2) to cover the test target alias created by
`CTEST_TEST_TARGET_ALIAS` too.

This should allow:

    set(CMAKE_CTEST_ARGUMENTS -T Test --no-compress-output)
    set(CTEST_TEST_TARGET_ALIAS runtests)
    include(CTest)

to use the arguments as part of `make runtests`.

Fixes: #22239
2022-08-30 15:00:16 -04:00
Colton G. Rushton
3a3ecef473 FindOpenGL: Fix confusing output with CMP0072 and OpenGL preference
If the legacy `GL` library is found, report that instead of GLVND's
`OpenGL` in the "found" message.
2022-08-30 13:59:48 -04:00
Dawid Wróbel
e706da5f7e FindOpenSP: Add module to find the OpenSP library
OpenSP has not seen a release in seventeen years, so is unlikely to ever
provide a CMake package configuration file.  Add a find module instead.
2022-08-30 13:55:07 -04:00
Kargatum
468a995346 FindBoost: Add support for Boost 1.80
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_80_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.80.0 source tree.
They are the same as 1.79's dependencies, so just update
the version check for warning about newer versions.
2022-08-30 13:46:22 -04:00
Craig Scott
7198d12d5e Merge topic 'correct_cupti_search_paths'
1f3c3589f1 FindCUDAToolkit: Search the cuda toolkit include path for cupti

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7608
2022-08-26 06:50:40 -04:00
Robert Maynard
1f3c3589f1 FindCUDAToolkit: Search the cuda toolkit include path for cupti 2022-08-24 09:49:10 -04:00
Craig Scott
a8b274c74e Merge topic 'bsd-variables'
a20d7a9707 BSD: Set *BSD variables when targeting a *BSD system
2ae42d0aa3 kFreeBSD: Do not unset LINUX variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7573
2022-08-22 17:37:49 -04:00
Cristian Adam
a20d7a9707 BSD: Set *BSD variables when targeting a *BSD system
Fixes: #23853
2022-08-21 09:27:59 +10:00
Cristian Adam
2ae42d0aa3 kFreeBSD: Do not unset LINUX variable
kFreeBSD is a Debian GNU distribution with a kernel from FreeBSD,
and should be marked as LINUX.
2022-08-21 09:27:35 +10:00
Brad King
7b9757e507 Merge topic 'cuda_mark_toolkit_includes_as_system'
ea659b155d CUDA: Always mark cuda toolkit as system include

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7476
2022-08-19 07:25:00 -04:00
Robert Maynard
ea659b155d CUDA: Always mark cuda toolkit as system include
Fixes: #23731
2022-08-18 10:37:06 -04:00
Brad King
c88bf61c8d Merge topic 'fortran-compiler-list'
35759e2497 Fortran: cleanup compiler default search list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7548
2022-08-17 14:19:33 -04:00
Brad King
8ad94b1977 Merge topic 'FindVulkan-tolerate-FATAL_ERROR'
9063674517 Help: Add 3.24 release note about FindVulkan component enforcement
bc01362368 FindVulkan: Restore tolerance of unknown FATAL_ERROR component

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7583
2022-08-17 10:16:10 -04:00
Brad King
bc01362368 FindVulkan: Restore tolerance of unknown FATAL_ERROR component
`find_package(Vulkan REQUIRED FATAL_ERROR)` calls exist in the wild, but
`find_package` does not have a `FATAL_ERROR` option.  We silently
tolerated such calls prior to commit 6e4d20921d (FindVulkan: Add
component for `shaderc_combined`, 2022-05-18, v3.24.0-rc1~111^2~5), by
treating the argument as a component and ignoring it.  Restore tolerance
by removing the component and warning about it.

Fixes: #23849
2022-08-17 09:52:12 -04:00
Brad King
8c144f0682 Merge topic 'output_all_attempts_at_compiler_detection'
9c5bd7fe3a CompilerId: Output errors from all attempts at detection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7576
2022-08-17 08:44:26 -04:00
Brad King
4a82938d60 Merge topic 'nvhpc_fpie_support'
52dc49deb9 NVHPC: Enable PIE support on linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !7564
2022-08-16 13:01:31 -04:00
Brad King
90607d182c Merge topic 'mingw-windres'
e9755bc7c1 MinGW: Restore using windres when toolchain-prefixed name is not available

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7574
2022-08-16 12:43:53 -04:00
Robert Maynard
9c5bd7fe3a CompilerId: Output errors from all attempts at detection
Instead of printing the output of the last attempt, print
the output of all attempts. This shows users that CMake isn't ignoring any provided flags ( LANG_FLAGS ).
2022-08-16 11:59:46 -04:00
Michael Hirsch
35759e2497 Fortran: cleanup compiler default search list
Made GNU gfortran be last in the list as per the docstring
immmediately preceding.
One high-level version-free name per vendor.
2022-08-16 06:20:06 -04:00
Brad King
e9755bc7c1 MinGW: Restore using windres when toolchain-prefixed name is not available
Since commit 55ba10dcfd (MSYS/MinGW Makefiles: Simplify selection of
windres as Resource Compiler, 2022-05-26, v3.24.0-rc1~82^2) the `MinGW
Makefiles` and `MSYS Makefiles` generators no longer specify the plain
`windres` name for the MinGW resource compiler.  Instead, the name is
specified in our MinGW platform information module. After the change in
commit af4adf6aa9 (MinGW: Fix default windres selection when
cross-compiling, 2020-03-25, v3.18.0-rc1~492^2), when cross-compiling,
we only specify the toolchain-prefixed name of the tool, which may not
be available in all environments.

If the toolchain-prefixed name is not available, fall back to the plain
`windres` name.  We already use this approach for other binutils.

Fixes: #23841
2022-08-15 13:57:58 -04:00
Robert Maynard
52dc49deb9 NVHPC: Enable PIE support on linux 2022-08-15 13:39:30 -04:00
Brad King
4befac3b32 Merge topic 'nvtx3'
cd200c6c2d FindCUDAToolkit: nvtx3 target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7568
2022-08-15 11:26:23 -04:00
Brad King
c5f6d93d5e Merge topic 'warning-as-error-ti-compiler'
1cd65dfa0e TI compiler: Add support for COMPILE_WARNING_AS_ERROR target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Josef Angstenberger <code@jtxa.de>
Merge-request: !7560
2022-08-15 10:51:45 -04:00
Brad King
732cad4952 Merge topic 'warning-as-error-ti-compiler' into release-3.24
1cd65dfa0e TI compiler: Add support for COMPILE_WARNING_AS_ERROR target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Josef Angstenberger <code@jtxa.de>
Merge-request: !7560
2022-08-15 10:51:44 -04:00
Brad King
d0a307ddcf Merge topic 'mingw-flto'
7b2a87c2eb IPO: Do not use -flto=auto with GCC 10.x on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7559
2022-08-15 10:48:27 -04:00
Brad King
2d08a35b50 Merge topic 'mingw-flto' into release-3.24
7b2a87c2eb IPO: Do not use -flto=auto with GCC 10.x on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7559
2022-08-15 10:48:26 -04:00
Craig Scott
a57ad5eba3 Merge topic 'FetchContent-protobuf-example-CMP0077'
b57681dc34 FetchContent: Fix protobuf example to avoid CMP0077 warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7565
2022-08-14 01:17:27 -04:00
Raul Tambre
cd200c6c2d FindCUDAToolkit: nvtx3 target
nvtx3 is a header-only replacement for the previous shared library
implementations.

I implemented it as a separate target since while the header names match and
ideally it should be API compatible, forcing its include directory into the old
target would lengthen the include search path and could cause confusion or
possible build differences for projects using multiple build systems. This
keeps it explicit as a developer opt-in.

Implements: #21377
Resolves: #23835
2022-08-13 23:52:42 +03:00
Harald Fernengel
b57681dc34 FetchContent: Fix protobuf example to avoid CMP0077 warning
The protobuf example would raise a "Policy CMP0077" warning and
protobuf tests would still be built, e.g. setting the variable is
ignored in latest CMake. Set an INTERNAL cache variable instead so
that CMP0077 warnings won't be triggered.
2022-08-13 09:44:45 +10:00
Craig Scott
1cd65dfa0e TI compiler: Add support for COMPILE_WARNING_AS_ERROR target property 2022-08-12 08:27:19 +10:00
Cristian Adam
62cd3904bf variable: Set LINUX variable on Linux target systems
Fixes: #23840
2022-08-12 07:20:05 +10:00
Brad King
7b2a87c2eb IPO: Do not use -flto=auto with GCC 10.x on Windows
Revise the change from commit fe57410b33 (IPO: Use -flto=auto if
compiler is GCC >= 10.1, 2022-06-22, v3.24.0-rc2~2^2) to require
at least GCC 11 on Windows.

Fixes: #23836
Issue: #23640
2022-08-10 14:49:34 -04:00
Brad King
9d5a129a06 Merge topic 'FindGTK2-homebrew'
899390fd7b FindGTK2: Search homebrew paths for arch-specific headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7552
2022-08-10 09:19:49 -04:00
Brad King
3907c08146 Merge topic 'ExternalProject-BUILD_ALWAYS-install'
81fd0d6e26 ExternalProject: Fix install on BUILD_ALWAYS+BUILD_BYPRODUCTS with Ninja
d9e88721ad ExternalProject: Add test case for BUILD_ALWAYS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7546
2022-08-10 09:14:33 -04:00
Dominic Hamon
899390fd7b FindGTK2: Search homebrew paths for arch-specific headers
Without this, CMake fails to find brew-installed GTK2 on macOS.
With it, GTK2 is found.
2022-08-09 09:25:23 -04:00
Brad King
8100f11713 Merge topic 'FindThreads-msvc-no-pthread-flag'
7203963788 FindThreads: Skip check for -pthread flag when targeting the MSVC ABI

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7551
2022-08-09 09:16:43 -04:00
Maik Nijhuis
81fd0d6e26 ExternalProject: Fix install on BUILD_ALWAYS+BUILD_BYPRODUCTS with Ninja
The `BUILD_BYPRODUCTS` option causes the ExternalProject's `build` step
in `build.ninja` to have `restat = 1`, so its "always out-of-date"
status caused by `BUILD_ALWAYS` does not propagate to the `install`
step.  Mark the latter step as explicitly always out-of-date too.

Fixes: #23820
2022-08-09 08:27:11 -04:00
Brad King
7203963788 FindThreads: Skip check for -pthread flag when targeting the MSVC ABI
Since commit 3257c34073 (FindThreads: avoid failing in AIX when using
-D_XOPEN_SOURCE=500, 2022-04-30, v3.24.0-rc1~197^2) we no longer check
for `pthreads.h` before checking for the `-pthread` flag.  Compilers
targeting the MSVC ABI do not have such a flag, so avoid performing the
check unnecessarily.

Fixes: #23829
2022-08-08 12:41:57 -04:00
Brad King
ed86192cd8 Merge topic 'doc-markup-program-options'
a6abdf6c8f Help: Consistent options declaration -- short first, then long
f4563f05db Help: Value for `--graphviz=` option actually is mandatory
04843d743e Help: Replace a bunch of more ``--option`` to `:option:` role
09446266ee Help: Replace mentions of ``-D`` option with :option:`-D` role
b57f27b087 Help: Replace mentions of ``-T`` and ``-A`` options with role
d25b232dee Help: Replace mentions of ``-G`` option with :option:`-G` role
63940e1cab Help: Replace mentions of ``-C`` option with :option:`-C` role
183a49cbfe Help: Replace mentions of ``-S`` option with :option:`-S` role
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7544
2022-08-08 09:39:41 -04:00
Brad King
ac00b37ea2 Merge topic 'swift_debug'
20fe9cf7e9 Swift: Disable optimization when compiling in Debug

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7545
2022-08-05 08:53:58 -04:00
Alex Turbov
d25b232dee Help: Replace mentions of `-G option with :option:-G` role 2022-08-04 19:34:45 +04:00
Alex Turbov
183a49cbfe Help: Replace mentions of `-S option with :option:-S` role 2022-08-04 19:33:42 +04:00
David Geldreich
20fe9cf7e9 Swift: Disable optimization when compiling in Debug
By default no `-O...` flag is specified for Debug configuration for
Swift so Xcode adds a (wrong) `-O` flag that prevents one from accessing
variables while debugging.  Add `-Onone` to the Swift Debug
configuration to avoid this.

Fixes: #23818
2022-08-04 09:45:31 -04:00
Brad King
52dec3f11f Merge topic 'enable-intel-llvm-ipo-3'
c633bd76d8 Add linker prefix for "-stack" flag on MSVC builds
6823db0c5a Enable IPO for IntelLLVM compilers on Linux and Windows
adbffd204d Propagate OpenMP compiler flags to linker for IntelLLVM
3640842df2 Tests: Update ModuleDefinition for IntelLLVM MSVC Frontend Variant
5d5a712303 IntelLLVM: Pass linker flags to the compiler when used as linker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7533
2022-08-04 09:37:47 -04:00