1 set(LLVM_LINK_COMPONENTS
2 ${LLVM_TARGETS_TO_BUILD}
10 # We should only have llvm-c-test use libLLVM if libLLVM is built with the
11 # default list of components. Using libLLVM with custom components can result in
14 set (USE_LLVM_DYLIB FALSE)
17 set (USE_LLVM_DYLIB TRUE)
18 if (DEFINED LLVM_DYLIB_COMPONENTS)
19 foreach(c in ${LLVM_LINK_COMPONENTS})
20 list(FIND LLVM_DYLIB_COMPONENTS ${c} C_IDX)
22 set(USE_LLVM_DYLIB FALSE)
30 set(LLVM_LINK_COMPONENTS)
33 if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
34 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wstrict-prototypes")
37 add_llvm_tool(llvm-c-test
49 target_link_libraries(llvm-c-test LLVM)