diff options
Diffstat (limited to 'Tests/RunCMake/cmake_language/defer_call.cmake')
-rw-r--r-- | Tests/RunCMake/cmake_language/defer_call.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/cmake_language/defer_call.cmake b/Tests/RunCMake/cmake_language/defer_call.cmake new file mode 100644 index 0000000..2e9595f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call.cmake @@ -0,0 +1,12 @@ +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") |