Files
CMake/Tests/RunCMake/CMP0118/CMP0118-Common-Helper.cmake
Deniz Bahadir 78c8d95605 GENERATED prop: Add some tests before introducing changes with CMP0118
These are tests which shall assure that the upcoming changes regarding
the `GENERATED` source-file property and the associated new policy
CMP0118 do not change (or only slightly change) the current, observable
behavior when policy CMP0118 is set to `OLD`.
2020-11-24 17:34:33 +01:00

15 lines
969 B
CMake

macro(get_and_print_GENERATED_property filename)
get_property(prop SOURCE "${CMAKE_CURRENT_BINARY_DIR}/${filename}" PROPERTY GENERATED)
message(NOTICE "${filename}: # 1a # GENERATED = `${prop}`")
get_source_file_property(prop "${CMAKE_CURRENT_BINARY_DIR}/${filename}" GENERATED)
message(NOTICE "${filename}: # 1b # GENERATED = `${prop}`")
get_property(prop SOURCE "${filename}" PROPERTY GENERATED)
message(NOTICE "${filename}: # 2a # GENERATED = `${prop}`")
get_source_file_property(prop "${filename}" GENERATED)
message(NOTICE "${filename}: # 2b # GENERATED = `${prop}`")
get_property(prop SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${filename}" PROPERTY GENERATED)
message(NOTICE "${filename}: # 3a # GENERATED = `${prop}`")
get_source_file_property(prop "${CMAKE_CURRENT_SOURCE_DIR}/${filename}" GENERATED)
message(NOTICE "${filename}: # 3b # GENERATED = `${prop}`")
endmacro()