Michael J. Spencer | 560a921 | 2010-09-13 23:54:41 +0000 | [diff] [blame] | 1 | set( LLVM_LINK_COMPONENTS |
Peter Collingbourne | 4b93d66 | 2011-02-19 23:03:58 +0000 | [diff] [blame] | 2 | support |
Michael J. Spencer | 560a921 | 2010-09-13 23:54:41 +0000 | [diff] [blame] | 3 | mc |
Steve Naroff | 5039819 | 2009-08-28 15:28:48 +0000 | [diff] [blame] | 4 | ) |
Douglas Gregor | 9a3dcf2 | 2009-10-05 22:29:42 +0000 | [diff] [blame] | 5 | |
Michael J. Spencer | 560a921 | 2010-09-13 23:54:41 +0000 | [diff] [blame] | 6 | add_clang_executable(c-index-test |
| 7 | c-index-test.c |
Michael J. Spencer | 5a7f349 | 2010-09-10 21:13:16 +0000 | [diff] [blame] | 8 | ) |
| 9 | |
Dmitri Gribenko | d3aa6c5 | 2012-11-07 23:52:25 +0000 | [diff] [blame] | 10 | if(NOT MSVC) |
| 11 | set_property( |
| 12 | SOURCE c-index-test.c |
| 13 | PROPERTY COMPILE_FLAGS "-std=c89" |
| 14 | ) |
| 15 | endif() |
| 16 | |
Chandler Carruth | b0d8671 | 2012-06-21 01:30:21 +0000 | [diff] [blame] | 17 | target_link_libraries(c-index-test |
| 18 | libclang |
| 19 | ) |
| 20 | |
Douglas Gregor | 9a3dcf2 | 2009-10-05 22:29:42 +0000 | [diff] [blame] | 21 | set_target_properties(c-index-test |
| 22 | PROPERTIES |
| 23 | LINKER_LANGUAGE CXX) |
Dmitri Gribenko | f303d4c | 2012-08-07 17:54:38 +0000 | [diff] [blame] | 24 | |
| 25 | # If libxml2 is available, make it available for c-index-test. |
NAKAMURA Takumi | af0e889 | 2012-12-14 18:30:20 +0000 | [diff] [blame] | 26 | if (CLANG_HAVE_LIBXML) |
Dmitri Gribenko | f303d4c | 2012-08-07 17:54:38 +0000 | [diff] [blame] | 27 | include_directories(${LIBXML2_INCLUDE_DIR}) |
| 28 | target_link_libraries(c-index-test ${LIBXML2_LIBRARIES}) |
| 29 | endif() |