Commit Graph

903 Commits

Author SHA1 Message Date
Craig Scott
51dd0d758d Merge topic 'doc-LINK_LIBRARY_genex'
d185f7c0a8 Help: Rework $<LINK_LIBRARY>, $<LINK_GROUP> and related docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7413
2022-07-03 00:50:45 -04:00
Craig Scott
d185f7c0a8 Help: Rework $<LINK_LIBRARY>, $<LINK_GROUP> and related docs
These changes restructure the docs to improve readability and flow,
correct grammar and typos, and fix errors and inconsistencies in
some of the examples.

Fixes: #23684
2022-07-03 14:34:41 +10:00
Brad King
b1d8141534 Merge topic 'log_level_command'
23bbac941a Add cmake_language(GET_MESSAGE_LOG_LEVEL) sub command
2b6ef864e0 Move LogLevel enum out of cmake.h header

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7348
2022-06-29 08:52:13 -04:00
Alexandru Croitor
23bbac941a Add cmake_language(GET_MESSAGE_LOG_LEVEL) sub command
The new sub-command writes a string representation of the
current log level to the output variable given to the
sub-command.

Given that the log-level might be set either via the --log-level
command line option or via the CMAKE_MESSAGE_LOG_LEVEL
cache / regular variables, the priority for each of the log level
sources is as follows, with the first one being the highest:
1) --log-level
2) CMAKE_MESSAGE_LOG_LEVEL regular variable
3) CMAKE_MESSAGE_LOG_LEVEL cache variable
4) default log level (STATUS)

Fixes: #23572
2022-06-28 16:03:22 +02:00
Brad King
3dd5b864f3 Merge topic 'doc-osx-cmp0126'
3fac3d365d Help: Mention CMP0126 in CMAKE_OSX_* variable documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7414
2022-06-28 09:19:35 -04:00
Da Quexian
3fac3d365d Help: Mention CMP0126 in CMAKE_OSX_* variable documentation
Signed-off-by: Da Quexian <daquexian566@gmail.com>
2022-06-27 13:36:13 -04:00
Brad King
5d8289116d Merge topic 'vs-compile-batching'
9a0a94fdaa VS: Add variable to to turn off Visual Studio compile batching
a7ebb73929 Help: Improve formatting in VS_NO_COMPILE_BATCHING docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7405
2022-06-23 09:23:56 -04:00
Brad King
9a0a94fdaa VS: Add variable to to turn off Visual Studio compile batching
Extend the change from commit b764c7c273 (VS: Add property to turn off
Visual Studio compile batching, 2022-02-07, v3.24.0-rc1~710^2) by
adding a variable to initialize the property on every target.

Issue: #23179
Fixes: #23639
2022-06-22 12:07:03 -04:00
Brad King
7eddfed10f Merge topic 'xcode-launch-mode'
a1a0ae3ad4 Xcode: Add Xcode SCHEME control for 'Launch' control

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7355
2022-06-16 08:59:51 -04:00
Harry Mallon
a1a0ae3ad4 Xcode: Add Xcode SCHEME control for 'Launch' control 2022-06-15 19:02:56 +01:00
Michael Hirsch
75aedb1204 Help: Clarify PROJECT_IS_TOP_LEVEL behavior w.r.t. add_subdirectory
Clarify documentation added by commit 2df4badc5f (Help: Note
PROJECT_IS_TOP_LEVEL behavior w.r.t. ExternalProject, 2021-07-05,
v3.21.0-rc3~1^2).

Fixes: #23511
2022-06-14 08:06:02 -04:00
Brad King
ea65362f98 Merge topic 'doc-using-deps-guide'
92e93f5c9e Help: Overhaul and expand the Using Dependencies Guide

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !7332
2022-06-09 09:03:14 -04:00
Brad King
9d43059132 Merge topic 'doc-using-deps-guide' into release-3.24
92e93f5c9e Help: Overhaul and expand the Using Dependencies Guide

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !7332
2022-06-09 09:03:13 -04:00
Craig Scott
92e93f5c9e Help: Overhaul and expand the Using Dependencies Guide
The guide previously only focused on the find_package() command,
with a bias towards libraries. FetchContent was not mentioned at all.
Reorganise and update the existing content. Add new sections to cover
providing dependencies with FetchContent and dependency providers.
Improve discoverability of the guide by mentioning it at the beginning
of the find_package(), FetchContent and dependency provider docs.
2022-06-09 22:55:11 +10:00
Brad King
253941634c Help: Update Sphinx versionadded directives for 3.24 release
Run the script:

    Utilities/Sphinx/update_versions.py --since v3.23.0 --overwrite
2022-06-08 09:07:21 -04:00
Brad King
711496b672 Merge topic 'LLVMFlang-compiler'
85749766df LLVMFlang: Add support for LLVM Flang

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7246
2022-05-26 08:52:02 -04:00
friendlyanon
711031df7c Help: Deprecate the CMAKE_COMPILER_IS_GNU* variables
Fixes: #23526
2022-05-24 18:01:38 +02:00
friendlyanon
c058fdb92a Help: Remove wrong versionadded for CMAKE_COMPILER_IS_GNU* variables
Commit 496ec6036f (Help: Add Sphinx 'versionadded' directives to each
top-level document, 2020-07-06, v3.19.0-rc1~558^2) added the
versionadded directive to many variables, but it wrongly detected the
commit a6d3f5418c (Help: Clarify documentation of
CMAKE_COMPILER_IS_GNU{CC,CXX,G77}, 2016-09-14, v3.7.0-rc1~120^2~1) as
the origin for these variables. In reality, these variables were
introduced in commit f5d95fb078 (Complete rework of makefile generators
expect trouble, 2002-11-08, v2.4.0~4935).
2022-05-24 17:51:10 +02:00
Tin Huynh
85749766df LLVMFlang: Add support for LLVM Flang
LLVM Flang (https://github.com/llvm/llvm-project/tree/main/flang) is an LLVM
Fortran compiler that shares the same name as Flang (also known as Classic
Flang). Classic Flang is in active development and is already identified by
CMake as Flang. As such, LLVM Flang will be identified as `LLVMFlang`.

Fixes: #22387
2022-05-24 10:37:33 -04:00
Brad King
88ed9355f5 Merge topic 'win_arm64_native_toolchain'
af6928ce92 VS: ARM64 as default toolset architecture for ARM64 host

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7264
2022-05-20 09:11:15 -04:00
Niyas Sait
af6928ce92 VS: ARM64 as default toolset architecture for ARM64 host
Visual Studio 2022 17 Preview introduced a native ARM64 toolchain.
2022-05-19 09:57:54 -04:00
Kyle Edwards
259c265112 VERIFY_HEADER_SETS: Rename to VERIFY_INTERFACE_HEADER_SETS
Issue: #23448
2022-05-18 10:18:40 -04:00
Brad King
a7cd15a61c Merge topic 'try_compile-project-platform-vars'
a6562ff579 try_compile: Add option to skip passing platform variables
4843a37676 try_compile: Propagate platform variables in project-mode too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7265
2022-05-17 08:57:55 -04:00
Brad King
a6562ff579 try_compile: Add option to skip passing platform variables
Add a `CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES` variable to tell
`try_compile` not to pass platform variables to the test project.

Issue: #23219
2022-05-16 10:47:21 -04:00
Brad King
4843a37676 try_compile: Propagate platform variables in project-mode too
Add policy CMP0137 to propagate both our builtin variables and those
listed by `CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` to `try_compile`
whole-project builds.

Inspired-by: Alexander Neumann <Alexander.Neumann@hamburg.de>
Fixes: #23219
2022-05-16 10:39:42 -04:00
Brad King
c4ed5341c4 Merge topic 'CMAKE_PROJECT_TOP_LEVEL_INCLUDES'
a6c34b0353 project(): Add new CMAKE_PROJECT_TOP_LEVEL_INCLUDES file injection point
8aa29a1793 CMakeDetermineSystem: Remove unreachable code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7250
2022-05-16 09:26:59 -04:00
Craig Scott
a6c34b0353 project(): Add new CMAKE_PROJECT_TOP_LEVEL_INCLUDES file injection point
Fixes: #22685
2022-05-13 18:03:36 +10:00
Brad King
79b64690d9 Merge topic 'werror-property'
76a08cd253 COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Michael Hirsch <michael@scivision.dev>
Merge-request: !7187
2022-05-10 10:30:42 -04:00
Martin Duffy
76a08cd253 COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors
Add `COMPILE_WARNING_AS_ERROR` target property and supporting
`CMAKE_COMPILE_WARNING_AS_ERROR` variable.

`COMPILE_WARNING_AS_ERROR` is initialized by
`CMAKE_COMPILE_WARNING_AS_ERROR`. It is a boolean variable. If it is
true, it expands to a different flag depending on the compiler such that
any warnings at compile will be treated as errors.

Supports compiler ids that I could find a relevant flag for.
2022-05-06 12:14:37 -04:00
Cameron Cawley
6a2b016bbd OpenWatcom: Support CMAKE_WATCOM_RUNTIME_LIBRARY with Linux and OS/2 builds 2022-05-06 10:40:59 -04:00
Cameron Cawley
33da5824ac OpenWatcom: Allow specifying the runtime library
Add a `CMAKE_WATCOM_RUNTIME_LIBRARY` variable to control the
runtime library selection.  Add policy CMP0136 to switch to
in place of the old hard-coded default flags.

Fixes: #23178
2022-05-06 10:40:58 -04:00
Craig Scott
c5dff5ace2 Merge topic 'FetchContent_find_package_integration'
29e31e2825 Packages: Integrate FetchContent and find_package()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: huangqinjin <huangqinjin@gmail.com>
Merge-request: !5688
2022-05-06 08:33:38 -04:00
Joachim Wuttke (h)
ab2bdbaf31 Help: Cross-reference ENV operator from cmake-language(7) manual 2022-05-05 09:36:23 -04:00
Craig Scott
29e31e2825 Packages: Integrate FetchContent and find_package()
Allow FetchContent_MakeAvailable() to try a call to
find_package() first, or redirect a find_package() call to
FetchContent_MakeAvailable(). The user can set variables
to control which of these are allowed or tried by default.

Fixes: #21687
2022-05-03 16:48:11 +10:00
Brad King
1bd85e8f3f Merge topic 'NO_CMAKE_INSTALL_PREFIX'
42f7e39789 Find: Support per call disabling of CMAKE_INSTALL_PREFIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7163
2022-04-22 08:59:09 -04:00
Robert Maynard
42f7e39789 Find: Support per call disabling of CMAKE_INSTALL_PREFIX
Fixes #23359
2022-04-15 09:33:55 -04:00
Brad King
b760828d3f CPack/DMG: Do not use CPACK_RESOURCE_FILE_LICENSE for SLA by default
Since macOS 12.0 deprecated the tools needed to attach a SLA to a
`.dmg`, we should no longer do this by default.  Add a policy to
change the default to off.

Fixes: #22978
2022-04-14 10:14:58 -04:00
Brad King
c508935dad Merge topic 'adsp-platform-and-compilers'
87142bbd5f ADSP: Add dedicated platform module
e9eabb0dcd ADSP: Configure compiler in compiler module
88b38f531a ADSP: Support both VDSP++ and CCES for ADSP compilers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7123
2022-04-06 12:04:43 -04:00
Chris Wright
87142bbd5f ADSP: Add dedicated platform module 2022-04-04 17:05:09 +01:00
Gregor Jasny
53ca6edd8a xcode: add support for xcconfig files
Fixes: #18420
2022-04-03 22:39:34 +02:00
Craig Scott
b1c502ff94 Help: Add missing cross-reference in CMAKE_USER_MAKE_RULES_OVERRIDE
The language-specific variable references the general one already,
but the general one did not mention the language-specific one.
Add that cross reference to improve discoverability.
2022-04-01 08:22:40 +11:00
Brad King
4c5c9291bc Merge topic 'help-variables-cmakecachefiledir-might-not-be-defined'
cf4100d7da Help: Add that CMAKE_CACHEFILE_DIR might not be defined

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7125
2022-03-31 08:49:06 -04:00
Tobias Nießen
cf4100d7da Help: Add that CMAKE_CACHEFILE_DIR might not be defined
CMake only sets `CMAKE_CACHEFILE_DIR` when writing `CMakeCache.txt`,
so the variable will usually be undefined when `CMakeLists.txt` runs.
Revise its documentation to clarify that `CMAKE_BINARY_DIR` should
be used instead.
2022-03-30 09:20:18 -04:00
Brad King
a7b325e203 Merge topic 'verify-header-sets'
c798744f81 FILE_SET: Add VERIFY_HEADER_SETS target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7085
2022-03-30 09:10:25 -04:00
Kyle Edwards
c798744f81 FILE_SET: Add VERIFY_HEADER_SETS target property
Fixes: #23338
2022-03-29 13:58:27 -04:00
Marc Chevrier
1777883f8b genex-LINK_(LIBRARY|GROUP) features: update variables behavior
Variable CMAKE_LINK_(LIBRARY|GROUP)_USING_<FEATURE>_SUPPORTED is evaluated
only if CMAKE_<LANG>_LINK_(LIBRARY|GROUP)_USING_<FEATURE>_SUPPORTED is not defined.

This new behavior enable to activate a feature globally on a platform and to disable
it for some compilers and languages.
2022-03-25 12:29:28 +01:00
Brad King
4ee256d8eb Merge topic 'better_cross-ref_CMAKE_FIND_NO_INSTALL_PREFIX'
7dc654a017 Help: Better cross-reference CMAKE_FIND_NO_INSTALL_PREFIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7097
2022-03-23 09:34:42 -04:00
Robert Maynard
7dc654a017 Help: Better cross-reference CMAKE_FIND_NO_INSTALL_PREFIX 2022-03-23 16:19:03 +11:00
Marc Chevrier
d658332782 Genex-LINK_GROUP: Add support feature RESCAN on BSD systems 2022-03-22 11:36:10 +01:00
Brad King
a4b04e62fc Merge topic 'LINK_LIBRARY-WHOLE_ARCHIVE'
dabe56de58 genex-LINK_LIBRARY: Add feature WHOLE_ARCHIVE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: huangqinjin <huangqinjin@gmail.com>
Merge-request: !7064
2022-03-21 14:35:59 -04:00