[AMDGPU][True16][CodeGen] true16 codegen pattern for v_med3_u/i16 (#121850)
[llvm-project.git] / clang / tools / c-index-test / CMakeLists.txt
blob24e7c9692ca56e6c160d5164b627e87c60a13a6c
1 set(LLVM_LINK_COMPONENTS
2   support
5 add_clang_executable(c-index-test
6   c-index-test.c
7   core_main.cpp
8   )
10 if(NOT MSVC)
11   set_property(
12     SOURCE c-index-test.c
13     PROPERTY COMPILE_FLAGS "-std=gnu89"
14     )
15 endif()
17 if (LLVM_BUILD_STATIC)
18   target_link_libraries(c-index-test
19     PRIVATE
20     libclang_static
21     clangCodeGen
22     clangIndex
23   )
24 else()
25   target_link_libraries(c-index-test
26     PRIVATE
27     libclang
28     clangAST
29     clangBasic
30     clangFrontend
31     clangIndex
32     clangSerialization
33   )
34 endif()
36 set_target_properties(c-index-test
37   PROPERTIES
38   LINKER_LANGUAGE CXX)
40 # If libxml2 is available, make it available for c-index-test.
41 if (CLANG_HAVE_LIBXML)
42   target_link_libraries(c-index-test PRIVATE LibXml2::LibXml2)
43 endif()
45 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
46   if(INTERNAL_INSTALL_PREFIX)
47     set(INSTALL_DESTINATION "${INTERNAL_INSTALL_PREFIX}/bin")
48     set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH
49        "@executable_path/../../lib")
50   else()
51     set(INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")
52   endif()
54   install(TARGETS c-index-test
55     RUNTIME DESTINATION "${INSTALL_DESTINATION}"
56     COMPONENT c-index-test)
58   if (NOT LLVM_ENABLE_IDE)
59     add_llvm_install_targets(install-c-index-test
60                              DEPENDS c-index-test
61                              COMPONENT c-index-test)
62   endif()
63 endif()