summaryrefslogtreecommitdiff
path: root/tools/opt/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tools/opt/CMakeLists.txt')
-rw-r--r--tools/opt/CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/opt/CMakeLists.txt b/tools/opt/CMakeLists.txt
index 1f76ab5551..1d3f08db7d 100644
--- a/tools/opt/CMakeLists.txt
+++ b/tools/opt/CMakeLists.txt
@@ -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)