forked from OSchip/llvm-project
[CMake] add_clang_library(MODULE): Create a phony target when llvm_add_library(MODULE) gave up.
llvm-svn: 201319
This commit is contained in:
parent
e72e2e9088
commit
8e57597830
|
@ -311,6 +311,7 @@ macro(add_clang_library name)
|
|||
endif()
|
||||
llvm_add_library(${name} ${ARG_UNPARSED_ARGUMENTS} ${srcs})
|
||||
|
||||
if(TARGET ${name})
|
||||
target_link_libraries( ${name} ${LLVM_COMMON_LIBS} )
|
||||
|
||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "libclang")
|
||||
|
@ -319,6 +320,10 @@ macro(add_clang_library name)
|
|||
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
RUNTIME DESTINATION bin)
|
||||
endif()
|
||||
else()
|
||||
# Add empty "phony" target
|
||||
add_custom_target(${name})
|
||||
endif()
|
||||
|
||||
set_target_properties(${name} PROPERTIES FOLDER "Clang libraries")
|
||||
endmacro(add_clang_library)
|
||||
|
|
Loading…
Reference in New Issue