static link polly into tools
[oota-llvm.git] / tools / opt / CMakeLists.txt
index 1f76ab55511b43a32364d018f385c59c69b00dcf..1d3f08db7d2984ef1653631451a1a92a026503da 100644 (file)
@@ -32,3 +32,12 @@ add_llvm_tool(opt
   opt.cpp
   )
 set_target_properties(opt PROPERTIES ENABLE_EXPORTS 1)
+
+if(WITH_POLLY AND LINK_POLLY_INTO_TOOLS)
+  target_link_libraries(opt Polly)
+  if(POLLY_LINK_LIBS)
+    foreach(lib ${POLLY_LINK_LIBS})
+      target_link_libraries(opt ${lib})
+    endforeach(lib)
+  endif(POLLY_LINK_LIBS)
+endif(WITH_POLLY AND LINK_POLLY_INTO_TOOLS)