Fixes to compile on OSX

This commit is contained in:
Guilhem Lavaux 2017-08-09 17:42:02 +02:00
parent 170e7b7020
commit bf0874bbd3
3 changed files with 21 additions and 4 deletions

View file

@ -1,5 +1,6 @@
set(CMAKE_SHARED_MODULE_PREFIX)
include_directories(${NUMPY_INCLUDE_DIRS} ${PYTHON_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src ${CMAKE_SOURCE_DIR}/python)
IF(CYTHON)
@ -39,7 +40,10 @@ add_library(_project MODULE ${CMAKE_CURRENT_BINARY_DIR}/_project.cpp)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Bsymbolic-functions")
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Bsymbolic-functions")
if(APPLE)
set(CMAKE_MODULE_LINKER_FLAGS "-undefined dynamic_lookup")
endif()
target_link_libraries(_cosmotool ${CosmoTool_local} ${PYTHON_LIBRARIES} ${GSL_LIBRARIES})
target_link_libraries(_cosmo_power ${CosmoTool_local} ${PYTHON_LIBRARIES} ${GSL_LIBRARIES})