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
23 target_link_libraries(c-index-test
33 set_target_properties(c-index-test
37 # If libxml2 is available, make it available for c-index-test.
38 if (CLANG_HAVE_LIBXML)
39 include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR})
40 target_link_libraries(c-index-test ${LIBXML2_LIBRARIES})
43 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
44 if(INTERNAL_INSTALL_PREFIX)
45 set(INSTALL_DESTINATION "${INTERNAL_INSTALL_PREFIX}/bin")
46 set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH
47 "@executable_path/../../lib")
49 set(INSTALL_DESTINATION bin)
52 install(TARGETS c-index-test
53 RUNTIME DESTINATION "${INSTALL_DESTINATION}"
54 COMPONENT c-index-test)
56 if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's.
57 add_custom_target(install-c-index-test
59 COMMAND "${CMAKE_COMMAND}"
60 -DCMAKE_INSTALL_COMPONENT=c-index-test
61 -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")