mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Always create `<target>_verify_*_header_sets` targets and the aggregate `all_verify_*_header_sets` utility targets when the corresponding property is enabled, even when no matching headers exist. When headers exist, an OBJECT library is created as before. When no headers are found, a UTILITY target is created instead to avoid warnings from tools like Xcode's libtool about empty static libraries. Update documentation with `.. versionchanged:: 4.4` directives, update tests, and add a release note. Fixes: #27685
10 lines
383 B
CMake
10 lines
383 B
CMake
enable_language(C)
|
|
|
|
# Target with VERIFY_INTERFACE_HEADER_SETS ON but no interface file sets
|
|
add_library(empty_iface STATIC lib.c)
|
|
set_property(TARGET empty_iface PROPERTY VERIFY_INTERFACE_HEADER_SETS ON)
|
|
|
|
# Target with VERIFY_PRIVATE_HEADER_SETS ON but no private file sets
|
|
add_library(empty_priv STATIC lib.c)
|
|
set_property(TARGET empty_priv PROPERTY VERIFY_PRIVATE_HEADER_SETS ON)
|