llvm.org GIT mirror llvm / 6be6579
[CMake] llvm_add_library: Add dependencies also to objlibs as workaround of CMake issue 14747. http://www.cmake.org/Bug/view.php?id=14747 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201855 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 5 years ago
1 changed file(s) with 13 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
126126 PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${native_export_file})
127127
128128 add_dependencies(${target_name} ${target_name}_exports)
129
130 # Add dependency to *_exports later -- CMake issue 14747
131 list(APPEND LLVM_COMMON_DEPENDS ${target_name}_exports)
132 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)
129133 endfunction(add_llvm_symbol_exports)
130134
131135 function(add_dead_strip target_name)
223227 llvm_update_compile_flags(${obj_name})
224228 set(ALL_FILES "$")
225229
230 # Do add_dependencies(obj) later due to CMake issue 14747.
231 list(APPEND objlibs ${obj_name})
232
226233 set_target_properties(${obj_name} PROPERTIES FOLDER "Object Libraries")
227234 endif()
228235
287294
288295 if(LLVM_COMMON_DEPENDS)
289296 add_dependencies(${name} ${LLVM_COMMON_DEPENDS})
297 # Add dependencies also to objlibs.
298 # CMake issue 14747 -- add_dependencies() might be ignored to objlib's user.
299 foreach(objlib ${objlibs})
300 message("add_dependencies(${objlib} ${LLVM_COMMON_DEPENDS})")
301 add_dependencies(${objlib} ${LLVM_COMMON_DEPENDS})
302 endforeach()
290303 endif()
291304 endfunction()
292305