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()