فهرست منبع

ENH: Added CMAKE_EXE_EXPORTS_C_FLAG and CMAKE_EXE_EXPORTS_CXX_FLAG to support executables that export symbols.

Brad King 18 سال پیش
والد
کامیت
66d1930f56
2فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 2 0
      Modules/Platform/FreeBSD.cmake
  2. 2 0
      Modules/Platform/Linux.cmake

+ 2 - 0
Modules/Platform/FreeBSD.cmake

@@ -7,6 +7,8 @@ IF(EXISTS /usr/include/dlfcn.h)
   SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")   # : or empty
   SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
   SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,")
+  SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
+  SET(CMAKE_EXE_EXPORTS_CXX_FLAG "-Wl,--export-dynamic")
 ENDIF(EXISTS /usr/include/dlfcn.h)
 
 # Initialize C link type selection flags.  These flags are used when

+ 2 - 0
Modules/Platform/Linux.cmake

@@ -8,6 +8,8 @@ SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
 SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
 SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,")
 SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,-soname,")
+SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
+SET(CMAKE_EXE_EXPORTS_CXX_FLAG "-Wl,--export-dynamic")
 
 # Initialize C link type selection flags.  These flags are used when
 # building a shared library, shared module, or executable that links