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