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