EXCLUDE_EMPTY_DIRECTORIES option excludes empty directories under the
directory to install. A directory is considered not empty if and only if
the directory contains at least one file or one symbolic link or one
none-empty sub-directory.
Closes: #19189
- Added a quick module introduction.
- Used "commands" instead of "functions".
- Listed macro names with short descriptions.
- Described command arguments as a list separately and moved code
examples to a dedicated section.
- Added examples section with extended examples demonstrating how to use
this module.
- Updated the description of the deprecated add_compiler_export_flags()
command and added example showing how to upgrade code when
encountering it.
- Added "See Also" section with some related links.
This makes it easier to find documentation for each option.
Previously they were sprinkled throughout prose. It also
provides a good place for ``versionadded`` directives.
CMake detects libraries that the compiler driver implicitly passes to
the linker, and stores them in `CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES`
for use in constructing mixed-language link lines. Some compiler driver
flags add implicitly linked libraries that should not be used during
mixed-language linking because they are handled by similar flags passed
to the other language's compiler driver. Add an environment variable
that users can set to avoid undesired implicit link libraries in such
scenarios.
Follow the pattern from commit 023de565d3 (Optionally exclude implicit
link directories via environment, 2023-05-25, v3.27.0-rc1~54^2).
Fixes: #26911
This deprecates the protobuf_generate_cpp() and protobuf_generate_python()
commands because the protobuf_generate() can work for both of these
cases and provides more options. Also, upstream Protobuf CMake-based
build system has marked these two commands as legacy and requires
setting a separate protobuf_MODULE_COMPATIBLE variable to boolean true
before calling the find_package(Protobuf).
Changes:
- Reworded and synced module documentation with other similar find
modules.
- Imported targets moved to top.
- Moved examples to a separate section.
- Extended examples with basic usage and some quick hints how to upgrade
deprecated commands to protobuf_generate().
- Used lowercase style of commands.
- Used "commands" instead of "functions" or "macros".
- Documented the DESCRIPTORS argument for protobuf_generate() command
and added a note that this option is not available when Protobuf is
found in config mode.
- Added a note about the Protobuf CMake-based build system and that
probuf_generate*() commands might come from the upstream CMake config
files. Mentioned also the protobuf_MODULE_COMPATIBLE variable from
upstream CMake build system.
See #21228.
This fixes this issue in favor of #24321 which tracks further
progress about Protobuf.
- Documented the missing `PROTOBUF_GENERATE_CPP_APPEND_PATH` variable.
See #19968.
Issue: #24321Fixes: #21228Fixes: #19968
149ee3b4bc Xcode: Use DEBUGGER_WORKING_DIRECTORY as a fallback for scheme work dir
0f1b9ef32a Help: VS_DEBUGGER_WORKING_DIRECTORY precedence
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10736
Since commit 6baf65ec46 (ASM: Do not consider MSVC C/CXX compiler for
generic ASM, 2025-04-08) we no longer mistake `cl` for an assembler.
However, some projects unconditionally enable ``ASM``, which worked
on Windows only due to that bug. Restore compatibility with such
projects by guarding the change behind a new policy ``CMP0194``.
Fixes: #26907
Issue: #26617
This also means when XCODE_SCHEME_WORKING_DIRECTORY is
set and a Xcode generator is used, that property will be used when
writing the debugger field in the file API replies.
Fixes: #26909
bf1bb62e74 macOS: Restore support for LLVM/Clang without explicit CMAKE_OSX_SYSROOT
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10734
In commit 7b19531291 (macOS: Do not pass any SDK/-isysroot to compilers
by default, 2024-11-06, v4.0.0-rc1~511^2) we broke support for using
upstream LLVM/Clang to build for macOS because the compiler has no
default sysroot. Handle empty `CMAKE_OSX_SYSROOT` with LLVM/Clang by
falling back to the macOS SDK reported by `xcrun --show-sdk-path` .
Fixes: #26863
This is a sync with the upstream `protobuf_generate()` command which has
this argument provided as a multi-value argument as of Protobuf 6.30.0
version (`cmake/protobuf-generate.cmake`).
cc6dbd194c GNUInstallDirs: Cache CMAKE_INSTALL_* with leading usr/ for install prefix /
a7fcb1320c GNUInstallDirs: Make GNUInstallDirs_get_absolute_install_dir a function
03e796f9ab GNUInstallDirs: Move the common handler for `SYSCONFDIR` and `LOCALSTATEDIR`
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10584
As a consequence, `GNUInstallDirs_get_absolute_install_dir` does not
alter the `var` argument (the relative path argument).
Closes: #26834
Signed-off-by: Cristian Le <git@lecris.dev>
- Do not try to guess the flags to pass to "cmake -E tar" ("z" or not) based
on the extension. It is not necessary, as the archive type is autodetected
since we switched to libarchive.
- Add new tests for .tar.zst archives, which would fail without the change.
Fixes: #25062
- Updated and synced module documentation with other similar find
modules.
- Used lowercase style for commands across the docs.
- Commands documented with indentation.
- Command arguments described as a list separately.
- Used "commands" instead of "macros".
- Extended examples section.
- Added example showing how to use found Flex library by creating an
imported target inside a project. Fixes: #18718
- Updated and synced module documentation with other similar find
modules.
- Documented bison_target() command indented relative to the title.
- Command arguments described as a list separately.
- Used "command" instead of "macro".
- Used lowercase style across the docs.
- Extended examples section.
Record `find_` command events in the configure log, except
`find_package` as it is far more complicated (and will have its own
event kind).
Note that testing only generates the events of interest, there is no
verification. Also note that testing that the "found" to "notfound"
transition causes an event is not testable because a truthy value in the
variable skips any kind of verification or other logic beyond
normalization.
Co-Authored-by: Ryan Krattiger <ryan.krattiger@kitware.com>
See: #24833
FindMFC:
- Synced module documentation with other similar find modules.
- Added examples section.
- Added reference link to CMAKE_MFC_FLAG variable.
CMAKE_MFC_FLAG:
- Added separate examples section.
- Mentioned FindMFC module.
- Used target_compile_definitions() instead of add_definitions().
- Module documentation synced with other similar find modules.
- Added examples section.
- Added note about Swift Testing framework, which supersedes the XCTest.
- Added note about the XCTEST target property and synced docs a bit.
- Used word "commands" instead of "macros" or "functions".
This hopefully helps a bit when upgrading CMake code that uses
`exec_program()` command.
Changes:
- Used third-person phrasing for the command description.
- The `exec_program()` command arguments in signature updated a bit.
- Mention of CMakeLists.txt file removed as this command also worked in
CMake scripts and other modes.
- Added examples section.