A build with -static currently fails when trying to link c-index-test.
The attached patch fixes it.

Cheers,
Rafael
diff --git a/tools/c-index-test/CMakeLists.txt b/tools/c-index-test/CMakeLists.txt
index 113172a..d889447 100644
--- a/tools/c-index-test/CMakeLists.txt
+++ b/tools/c-index-test/CMakeLists.txt
@@ -9,9 +9,15 @@ if(NOT MSVC)
     )
 endif()
 
-target_link_libraries(c-index-test
-  libclang
+if (LIBCLANG_BUILD_STATIC)
+  target_link_libraries(c-index-test
+    libclang_static
   )
+else()
+  target_link_libraries(c-index-test
+    libclang
+  )
+endif()
 
 set_target_properties(c-index-test
   PROPERTIES
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to