From 313b77fabd7b2f418ec18320b179d82bd06f06b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 15 Jan 2015 14:21:29 +0100 Subject: [PATCH] Allow undefined symbols in shared library on OSX --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 856cb56c2..acb113207 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,10 @@ else () set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -DSHAREDLIB -fPIC") endif() +if(APPLE) + set(CMAKE_SHARED_LINKER_FLAGS "-undefined dynamic_lookup") +endif() + # LLVM if(LLVM_DIR) # local LLVM build find_package(LLVM REQUIRED CONFIG)