Add an argument to the `project` command to allow specifying a license
for a project as a whole. This is in addition to specifying licenses on
individual targets, and will be used to set the license(s) on exported
packages.
Also, move listing of `COMPAT_VERSION` variables to follow
lexicographical order.
With IntelLLVM on Windows, we link using the compiler driver.
With MSVC on Windows, we invoke the linker directly. If we
use both in a single build tree, for separate languages,
the value of `CMAKE_LINK_DEF_FILE_FLAG` conflicts. Add a
per-language `CMAKE_<LANG>_LINK_DEF_FILE_FLAG` variable to
avoid the conflict. Preserve the language-agnostic variable
for compatibility with projects that reference it.
Fixes: #26005
Add a `AUTOMOC_INCLUDE_DIRECTORIES` target property and a corresponding
`CMAKE_AUTOMOC_INCLUDE_DIRECTORIES` variable to initialize it.
This is useful for targets that do not need moc to search include
directories from all dependencies.
Closes: #26414
In commit 84996a65aa (Unity: Add option to use relative paths for unity
files, 2024-10-15, v4.0.0-rc1~637^2) we added support for this variable
to initialize the `UNITY_BUILD_RELOCATABLE` target property, but forgot
to document it.
Issue: #26352
7f0f382c55 Provide CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID on more compilers
019f0f8b32 ARCHITECTURE_ID: Save persistently even if empty
8e46672b29 Fortran: Detect pointer size on sparc architectures
eddf66eaef CMakeDetermineASMCompiler: De-duplicate list of compiler info variables
c0224f5aa1 CMakeDetermineCompilerABI: Make ABI info string more robust
67ab580804 Windows/Clang: Fix indentation in platform information module
1c9f8eeb4f Help: Document CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10516
This adds a `CMAKE_FIND_REQUIRED` variable which causes `find_package`,
`find_path`, `find_file`, `find_library` and `find_program` to be
considered `REQUIRED` by default.
It also introduces an `OPTIONAL` keyword to those commands, allowing
them to ignore the value of this variable.
Issue: #26576
Provide packagers and end users with a way to try configuring projects that
have not been updated to set their policy version to a supported level.
Closes: #26698
This allows projects to use `if(AIX)` blocks instead of spelling
out `if(CMAKE_SYSTEM_NAME STREQUAL "AIX")`. We already have similar
variables for many other platforms.
Replace our hard-coded default for `/RTC1` with a first-class
abstraction to select runtime checks from an enumeration of logical
names. Add a `MSVC_RUNTIME_CHECKS` target property and corresponding
`CMAKE_MSVC_RUNTIME_CHECKS` variable.
Removing the old default flag requires a policy because existing
projects may rely on string processing to edit them and choose
runtime checks under the old behavior. Add policy CMP0184 to
provide compatibility.
Fixes: #26614
CMake now provides the CMAKE_<LANG>_LINK_MODE variable which specify how
the link step is done. So, the CMAKE_<LANG>_USING_LINKER_MODE variable
is no longer needed.
This variable define how the link step is done. Possible values are:
* DRIVER: the compiler is used as driver for the link step
* LINKER: the linker is used directly for the link step.
Adds the ``--project-file`` command-line option to modify the default script
name loaded by CMake and ``add_subdirectory`` to values other than
``CMakeLists.txt``.
Fixes: #21570
Add a way to specify, in a portable way, to raise an error for any
warning during the link step. For that purpose, define:
* CMAKE_LINK_WARNING_AS_ERROR variable
* LINK_WARNING_AS_ERROR target property
Fixes: #25343
The `BUILD_TESTING` variable is referenced in `add_test` and
`enable_testing`. It should be documented as it controls the
behavior tests working when projects use `include(CTest)`.
7abd3137b7 Linking: Optionally reorder direct dependencies from LINK_LIBRARIES
9285a9dc9a cmComputeLinkDepends: Add final dependency ordering to debug output
f792db4ca2 cmComputeLinkDepends: Add undocumented per-target debug property
80b469a51d cmComputeLinkDepends: Factor out string literals as named constants
3bd73fcc76 cmComputeLinkDepends: Modernize member initialization
8db69c767b cmComputeLinkDepends: Remove redundant member
dccdd030cd cmComputeLinkDepends: Replace depender index sentinel value with cm::optional
6c9d8dc243 cmComputeLinkDepends: Replace group index sentinel value with cm::optional
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9835
Traditionally CMake generates link lines by starting with the direct
link dependencies specified by `LINK_LIBRARIES` in their original order
and then appending indirect dependencies that the direct dependencies
do not express. This gives projects control over ordering among
independent entries, which can be important when intermixing flags
and libraries, or when multiple libraries provide the same symbol.
However, it may also result in inefficient link lines.
Add support for an alternative strategy that can reorder direct link
dependencies to produce more efficient link lines. This is useful
for projects that cannot easily specify their targets' direct
dependencies in an order that satisfies indirect dependencies.
Add a `CMAKE_LINK_LIBRARIES_STRATEGY` variable and corresponding
`LINK_LIBRARIES_STRATEGY` target property to select a strategy.
Fixes: #26271
e77655555c cmExperimental: gate build database support behind a flag
23cbeb5035 ci: enable `build_database` CXXModules tests
6863c1d823 Tests/CXXModules: add tests for module commands
123107c1a4 Tests/CXXModules: add support for running targets under a given config
438038b5e1 Tests/CXXModules: support building specific targets of example trees
84bc710d84 cmGlobalGenerator: generate build database files for targets
670f753f24 cmDyndepCollation: write build database metadata
dcf9a66ffe cxxmodules: plumb control data for exporting build databases
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9708
Detect Windows Kernel-Mode Driver include directories and library search
paths from the WDK command-line environment. Require toolchain files to
specify the KMDF target version via a new variable.
Since this changes the behavior of the WindowsKernelModeDriver
experimental feature, update its UUID.
This includes the target property, its initializing variable, its
initializing environment variable, and updating related docs to mention
the new bits.