1set( LLVM_LINK_COMPONENTS
2  support
3  mc
4  )
5
6add_clang_executable(c-index-test
7  c-index-test.c
8  )
9
10if(NOT MSVC)
11  set_property(
12    SOURCE c-index-test.c
13    PROPERTY COMPILE_FLAGS "-std=c89"
14    )
15endif()
16
17target_link_libraries(c-index-test
18  libclang
19  )
20
21set_target_properties(c-index-test
22  PROPERTIES
23  LINKER_LANGUAGE CXX)
24
25# If libxml2 is available, make it available for c-index-test.
26if (CLANG_HAVE_LIBXML)
27  include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR})
28  target_link_libraries(c-index-test ${LIBXML2_LIBRARIES})
29endif()
30