Symbols protection

This commit is contained in:
Guilhem Lavaux 2021-01-25 09:50:48 +01:00
parent 793c649a8d
commit 041cfc0630
3 changed files with 18 additions and 6 deletions

View file

@ -54,6 +54,10 @@ SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Bsymbolic-functions
if(APPLE)
set(CMAKE_MODULE_LINKER_FLAGS "-undefined dynamic_lookup")
endif()
IF(NOT APPLE)
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/cosmotool.version")
ENDIF()
target_link_libraries(_cosmotool PRIVATE ${CosmoTool_local} ${GSL_LIBRARIES})
target_link_libraries(_cosmo_power PRIVATE ${CosmoTool_local} ${GSL_LIBRARIES})

7
python/cosmotool.version Normal file
View file

@ -0,0 +1,7 @@
CODEABI_1.0 {
global:
PyInit_*;
_init;
_fini;
local: *;
};