From f1eaed5841083556a0fadd454bb8eb1103f02e43 Mon Sep 17 00:00:00 2001
From: Frank Gaede <frank.gaede@desy.de>
Date: Tue, 1 Nov 2016 12:00:22 +0100
Subject: [PATCH] clang linker dynamic lookup of undefined symbols

---
 cmake/DD4hepBuild.cmake | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake
index 3876dbb13..4f24dc079 100644
--- a/cmake/DD4hepBuild.cmake
+++ b/cmake/DD4hepBuild.cmake
@@ -44,6 +44,10 @@ macro(dd4hep_set_compiler_flags)
     endif()
   endif()
 
+ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+   set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -undefined dynamic_lookup")
+ endif()
+
 endmacro(dd4hep_set_compiler_flags)
 #---------------------------------------------------------------------------------------------------
 #  dd4hep_debug
-- 
GitLab