mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Print CMake entities' properties in human-readable form for debugging. Issue: #27513
25 lines
471 B
CMake
25 lines
471 B
CMake
enable_language(C)
|
|
|
|
add_library(libdep INTERFACE)
|
|
add_library(mylib STATIC nothing.c)
|
|
target_link_libraries(mylib PRIVATE libdep)
|
|
|
|
# One call per regex so each warning text is short and won't wrap.
|
|
cmake_language(
|
|
PRINT_PROPERTIES
|
|
TARGETS mylib
|
|
DEFERRED
|
|
FOLLOW_DEPENDENCIES
|
|
ALL
|
|
PROPERTY_NAME_REGEX "ZZZ_NO_SUCH_PROPERTY"
|
|
)
|
|
|
|
cmake_language(
|
|
PRINT_PROPERTIES
|
|
TARGETS mylib
|
|
DEFERRED
|
|
FOLLOW_DEPENDENCIES
|
|
ALL
|
|
PROPERTY_VALUE_REGEX "ZZZ_NO_SUCH_VALUE"
|
|
)
|