Files
cmake/Tests/RunCMake/PrintHelpers/PrintPropertiesArgForwarding.cmake
Tom Osika 048ee670f2 cmake_print_properties: Deprecate in favor of cmake_language(PRINT_PROPERTIES)
Re-implement it in terms of the replacement command.

Issue: #27513
2026-08-10 17:45:47 -04:00

14 lines
507 B
CMake

include(CMakePrintHelpers)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/stub.c" "void stub(void) {}\n")
add_library(mylib STATIC "${CMAKE_CURRENT_BINARY_DIR}/stub.c")
# TARGETS scope: forwards as TARGETS mylib NAMED TYPE NAME.
cmake_print_properties(TARGETS mylib PROPERTIES TYPE NAME)
# SOURCES scope: forwards as SOURCES stub.c NAMED LANGUAGE. Confirms
# scope-keyword translation covers more than just TARGETS.
cmake_print_properties(
SOURCES "${CMAKE_CURRENT_BINARY_DIR}/stub.c"
PROPERTIES LANGUAGE)