Michael J. Spencer | 0947621 | 2010-09-13 23:54:41 +0000 | [diff] [blame] | 1 | add_clang_executable(c-index-test |
| 2 | c-index-test.c |
Michael J. Spencer | 0881f4a | 2010-09-10 21:13:16 +0000 | [diff] [blame] | 3 | ) |
| 4 | |
Dmitri Gribenko | 9fcad094 | 2012-11-07 23:52:25 +0000 | [diff] [blame] | 5 | if(NOT MSVC) |
| 6 | set_property( |
| 7 | SOURCE c-index-test.c |
Rafael Espindola | cf63c0d | 2014-01-08 11:44:42 +0000 | [diff] [blame] | 8 | PROPERTY COMPILE_FLAGS "-std=gnu89" |
Dmitri Gribenko | 9fcad094 | 2012-11-07 23:52:25 +0000 | [diff] [blame] | 9 | ) |
| 10 | endif() |
| 11 | |
Rafael Espindola | 8cbf4a0 | 2014-11-05 14:04:25 +0000 | [diff] [blame^] | 12 | if (LLVM_BUILD_STATIC) |
| 13 | target_link_libraries(c-index-test |
| 14 | libclang_static |
Chandler Carruth | 28969b4 | 2012-06-21 01:30:21 +0000 | [diff] [blame] | 15 | ) |
Rafael Espindola | 8cbf4a0 | 2014-11-05 14:04:25 +0000 | [diff] [blame^] | 16 | else() |
| 17 | target_link_libraries(c-index-test |
| 18 | libclang |
| 19 | ) |
| 20 | endif() |
Chandler Carruth | 28969b4 | 2012-06-21 01:30:21 +0000 | [diff] [blame] | 21 | |
Douglas Gregor | 084a654 | 2009-10-05 22:29:42 +0000 | [diff] [blame] | 22 | set_target_properties(c-index-test |
| 23 | PROPERTIES |
| 24 | LINKER_LANGUAGE CXX) |
Dmitri Gribenko | 740c0fb | 2012-08-07 17:54:38 +0000 | [diff] [blame] | 25 | |
| 26 | # If libxml2 is available, make it available for c-index-test. |
NAKAMURA Takumi | 92eb254 | 2012-12-14 18:30:20 +0000 | [diff] [blame] | 27 | if (CLANG_HAVE_LIBXML) |
NAKAMURA Takumi | 80e373e | 2013-07-09 11:14:30 +0000 | [diff] [blame] | 28 | include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR}) |
Dmitri Gribenko | 740c0fb | 2012-08-07 17:54:38 +0000 | [diff] [blame] | 29 | target_link_libraries(c-index-test ${LIBXML2_LIBRARIES}) |
| 30 | endif() |