llvm.org GIT mirror llvm / 571417b
[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 NAKAMURA Takumi 5 years ago
1 changed file(s) with 7 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
173173 # Same as the variable LLVM_LINK_COMPONENTS.
174174 # LINK_LIBS lib_targets...
175175 # Same semantics as target_link_libraries().
176 # ADDITIONAL_HEADERS (implemented in LLVMProcessSources)
176 # ADDITIONAL_HEADERS
177177 # May specify header files for IDE generators.
178178 # )
179179 function(llvm_add_library name)
180180 cmake_parse_arguments(ARG
181181 "MODULE;SHARED;STATIC"
182182 "OUTPUT_NAME"
183 "DEPENDS;LINK_COMPONENTS;LINK_LIBS"
183 "ADDITIONAL_HEADERS;DEPENDS;LINK_COMPONENTS;LINK_LIBS"
184184 ${ARGN})
185185 list(APPEND LLVM_COMMON_DEPENDS ${ARG_DEPENDS})
186 llvm_process_sources(ALL_FILES ${ARG_UNPARSED_ARGUMENTS})
186 if(ARG_ADDITIONAL_HEADERS)
187 # Pass through ADDITIONAL_HEADERS.
188 set(ARG_ADDITIONAL_HEADERS ADDITIONAL_HEADERS ${ARG_ADDITIONAL_HEADERS})
189 endif()
190 llvm_process_sources(ALL_FILES ${ARG_UNPARSED_ARGUMENTS} ${ARG_ADDITIONAL_HEADERS})
187191
188192 if(ARG_MODULE)
189193 if(ARG_SHARED OR ARG_STATIC)