[llvm] [CMake] Passthrough variables for packages to subbuilds (PR #107611)
Shoaib Meenai via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 6 10:42:54 PDT 2024
================
@@ -156,6 +156,32 @@ function(llvm_ExternalProject_Add name source_dir)
set_target_properties(${name}-clear PROPERTIES FOLDER "${ARG_FOLDER}")
endif ()
+ set(DEFAULT_PASSTHROUGH_VARIABLES
+ LibEdit_INCLUDE_DIRS
+ LibEdit_LIBRARIES
+ ZLIB_INCLUDE_DIR
+ ZLIB_LIBRARY
+ zstd_INCLUDE_DIR
+ zstd_LIBRARY
+ LIBXML2_LIBRARY
+ LIBXML2_INCLUDE_DIR
+ CURL_INCLUDE_DIR
+ CURL_LIBRARY
+ HTTPLIB_INCLUDE_DIR
+ HTTPLIB_HEADER_PATH
+ Python3_EXECUTABLE
+ Python3_LIBRARIES
+ Python3_INCLUDE_DIRS
+ Python3_RPATH
+ )
+ foreach(variable ${DEFAULT_PASSTHROUGH_VARIABLES})
+ get_property(is_value_set CACHE ${variable} PROPERTY VALUE SET)
+ if(${is_value_set})
+ get_property(value CACHE ${variable} PROPERTY VALUE)
+ list(APPEND CMAKE_CACHE_DEFAULT_ARGS "-D${variable}:STRING=${value}")
----------------
smeenai wrote:
Do we not need to replace `;` with `|` to have list variables be passed through correctly? The documentation isn't clear on whether `LIST_SEPARATOR` applies to `CMAKE_CACHE_DEFAULT_ARGS`.
https://github.com/llvm/llvm-project/pull/107611
More information about the llvm-commits
mailing list