>CMAKE_EXE_LINKER_FLAGS is a user-settable value in the local cache
> so instead of setting it outright you should prepend or append:
>
>   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-zorigin")

Ah, OK.

The attached patch should fix both issues.

Cheers,
Rafael
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72901c8..67ad681 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -446,6 +446,7 @@ if (APPLE)
   set(CMAKE_INSTALL_NAME_DIR "@executable_path/../lib")
   set(CMAKE_INSTALL_RPATH "@executable_path/../lib")
 else(UNIX)
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-zorigin")
   if(NOT DEFINED CMAKE_INSTALL_RPATH)
     set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
   endif(NOT DEFINED CMAKE_INSTALL_RPATH)
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to