mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
[CMake] llvm_add_library: Add handling of the parameter ADDITIONAL_HEADERS to pass through to process_source.
I was insightless then about unknown optional parameters. (Consider that LINK_LIBS foo bar ADDITIONAL_HEADERS qux quux) Suggested by Michael Kruse. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201283 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
81c7e1871f
commit
571417b8a3
@ -174,17 +174,21 @@ endfunction()
|
||||
# Same as the variable LLVM_LINK_COMPONENTS.
|
||||
# LINK_LIBS lib_targets...
|
||||
# Same semantics as target_link_libraries().
|
||||
# ADDITIONAL_HEADERS (implemented in LLVMProcessSources)
|
||||
# ADDITIONAL_HEADERS
|
||||
# May specify header files for IDE generators.
|
||||
# )
|
||||
function(llvm_add_library name)
|
||||
cmake_parse_arguments(ARG
|
||||
"MODULE;SHARED;STATIC"
|
||||
"OUTPUT_NAME"
|
||||
"DEPENDS;LINK_COMPONENTS;LINK_LIBS"
|
||||
"ADDITIONAL_HEADERS;DEPENDS;LINK_COMPONENTS;LINK_LIBS"
|
||||
${ARGN})
|
||||
list(APPEND LLVM_COMMON_DEPENDS ${ARG_DEPENDS})
|
||||
llvm_process_sources(ALL_FILES ${ARG_UNPARSED_ARGUMENTS})
|
||||
if(ARG_ADDITIONAL_HEADERS)
|
||||
# Pass through ADDITIONAL_HEADERS.
|
||||
set(ARG_ADDITIONAL_HEADERS ADDITIONAL_HEADERS ${ARG_ADDITIONAL_HEADERS})
|
||||
endif()
|
||||
llvm_process_sources(ALL_FILES ${ARG_UNPARSED_ARGUMENTS} ${ARG_ADDITIONAL_HEADERS})
|
||||
|
||||
if(ARG_MODULE)
|
||||
if(ARG_SHARED OR ARG_STATIC)
|
||||
|
Loading…
Reference in New Issue
Block a user