2010-09-14 07:54:41 +08:00
|
|
|
add_clang_executable(c-index-test
|
|
|
|
c-index-test.c
|
2010-09-11 05:13:16 +08:00
|
|
|
)
|
|
|
|
|
2012-11-08 07:52:25 +08:00
|
|
|
if(NOT MSVC)
|
|
|
|
set_property(
|
|
|
|
SOURCE c-index-test.c
|
2014-01-08 19:44:42 +08:00
|
|
|
PROPERTY COMPILE_FLAGS "-std=gnu89"
|
2012-11-08 07:52:25 +08:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2014-11-05 22:04:25 +08:00
|
|
|
if (LLVM_BUILD_STATIC)
|
|
|
|
target_link_libraries(c-index-test
|
|
|
|
libclang_static
|
2012-06-21 09:30:21 +08:00
|
|
|
)
|
2014-11-05 22:04:25 +08:00
|
|
|
else()
|
|
|
|
target_link_libraries(c-index-test
|
|
|
|
libclang
|
|
|
|
)
|
|
|
|
endif()
|
2012-06-21 09:30:21 +08:00
|
|
|
|
2009-10-06 06:29:42 +08:00
|
|
|
set_target_properties(c-index-test
|
|
|
|
PROPERTIES
|
|
|
|
LINKER_LANGUAGE CXX)
|
2012-08-08 01:54:38 +08:00
|
|
|
|
|
|
|
# If libxml2 is available, make it available for c-index-test.
|
2012-12-15 02:30:20 +08:00
|
|
|
if (CLANG_HAVE_LIBXML)
|
2013-07-09 19:14:30 +08:00
|
|
|
include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR})
|
2012-08-08 01:54:38 +08:00
|
|
|
target_link_libraries(c-index-test ${LIBXML2_LIBRARIES})
|
|
|
|
endif()
|