1 set(LLVM_LINK_COMPONENTS
5 add_clang_executable(c-index-test
13 PROPERTY COMPILE_FLAGS "-std=gnu89"
17 if (LLVM_BUILD_STATIC)
18 target_link_libraries(c-index-test
25 target_link_libraries(c-index-test
37 set_target_properties(c-index-test
41 # If libxml2 is available, make it available for c-index-test.
42 if (CLANG_HAVE_LIBXML)
43 target_link_libraries(c-index-test PRIVATE LibXml2::LibXml2)
46 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
47 if(INTERNAL_INSTALL_PREFIX)
48 set(INSTALL_DESTINATION "${INTERNAL_INSTALL_PREFIX}/bin")
49 set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH
50 "@executable_path/../../lib")
52 set(INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")
55 install(TARGETS c-index-test
56 RUNTIME DESTINATION "${INSTALL_DESTINATION}"
57 COMPONENT c-index-test)
59 if (NOT LLVM_ENABLE_IDE)
60 add_llvm_install_targets(install-c-index-test
62 COMPONENT c-index-test)