You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
734 B

set(message_command "message")
set(final_message "This should not be printed because variable evaluation is deferred too.")
cmake_language(DEFER CALL ${message_command} STATUS "First Deferred Message")
add_subdirectory(defer_call)
cmake_language(DEFER CALL cmake_language DEFER CALL "${final_message_command}" STATUS "${final_message}")
cmake_language(DEFER CALL cmake_language DEFER GET_CALL_IDS ids)
cmake_language(DEFER CALL cmake_language EVAL CODE [[message(STATUS "Deferred Message: ids='${ids}'")]])
cmake_language(DEFER GET_CALL_IDS ids)
message(STATUS "Immediate Message: ids='${ids}'")
set(final_message_command "message")
set(final_message "Final Deferred Message")
set(subdir_message "Deferred Message From Subdirectory")