Fixed compilation option for CosmoTool. Show a message to indicate which variant is used to build the python modules

This commit is contained in:
Guilhem Lavaux 2015-02-10 13:43:05 +01:00
parent beb651c79a
commit 68bdc4fb31
3 changed files with 30 additions and 23 deletions

View file

@ -1,4 +1,3 @@
add_definitions(-fPIC)
SET(CosmoTool_SRCS
fortran.cpp
@ -75,9 +74,11 @@ if (BUILD_SHARED_LIBS)
target_link_libraries(CosmoTool ${CosmoTool_LIBS})
if (BUILD_STATIC_LIBS)
add_library(CosmoTool_static STATIC ${CosmoTool_SRCS})
set_target_properties(CosmoTool_static PROPERTIES COMPILE_FLAGS "${CMAKE_C_COMPILE_OPTIONS_PIC}")
endif(BUILD_STATIC_LIBS)
else (BUILD_SHARED_LIBS)
add_library(CosmoTool STATIC ${CosmoTool_SRCS})
set_target_properties(CosmoTool PROPERTIES COMPILE_FLAGS "${CMAKE_C_COMPILE_OPTIONS_PIC}")
endif (BUILD_SHARED_LIBS)
install(TARGETS CosmoTool