Cannot use `DEFER CALL` on Find<PACKAGE>.cmake files
I wanted to do something like:
list(APPEND CMAKE_MESSAGE_CONTEXT FindMyPkg)
cmake_language(DEFER CALL list POP_BACK CMAKE_MESSAGE_CONTEXT)
Which would simplify calls where I would use return
, but that does not seem to be possible since the Find<Package>.cmake
is treated as an include
instead of add_subdirectory
. Would it be possible to extend DEFER CALL
to be usable in block
/function
/macro
/include
directives?