vcpkg/scripts/cmake/z_vcpkg_forward_output_variable.cmake
Robert Schumacher 7d2449c346
[docs] Delete embedded documentation in favor of docs/ (#25096)
* [docs] Delete embedded documentation in favor of docs/

Drive-by for the helper ports:
1. "documentation": "https://vcpkg.io/en/docs/README.html"
2. "license": "MIT"
3. Use `include_guard(GLOBAL)` in all script files
4. Make sure any persistent variables are saved to the cache

* [docs] Restore empty regenerate.ps1 to satisfy Azure Pipelines

* [docs] PR comments
2022-06-07 16:26:51 -07:00

13 lines
483 B
CMake

macro(z_vcpkg_forward_output_variable ptr_to_parent_var var_to_forward)
if("${ARGC}" GREATER "2")
message(FATAL_ERROR "z_vcpkg_forward_output_variable was passed extra arguments: ${ARGN}")
endif()
if(DEFINED "${ptr_to_parent_var}")
if(DEFINED "${var_to_forward}")
set("${${ptr_to_parent_var}}" "${${var_to_forward}}" PARENT_SCOPE)
else()
unset("${${ptr_to_parent_var}}" PARENT_SCOPE)
endif()
endif()
endmacro()