Commit 047fed15 authored by Jane Tournois's avatar Jane Tournois

add the option to use dynamic linking for boost in cmake

parent b7b79b01
Pipeline #1209 passed with stage
...@@ -65,6 +65,17 @@ if(Boost_FOUND) ...@@ -65,6 +65,17 @@ if(Boost_FOUND)
list( APPEND COMISO_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS} ) list( APPEND COMISO_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS} )
list( APPEND COMISO_LINK_DIRECTORIES ${Boost_LIBRARY_DIR} ) list( APPEND COMISO_LINK_DIRECTORIES ${Boost_LIBRARY_DIR} )
list( APPEND COMISO_LINK_LIBRARIES ${Boost_LIBRARIES} ) list( APPEND COMISO_LINK_LIBRARIES ${Boost_LIBRARIES} )
option(Boost_USE_STATIC_LIBS "Link with static Boost libraries" ON)
mark_as_advanced(Boost_USE_STATIC_LIBS)
if(Boost_USE_STATIC_LIBS)
set(Boost_USE_STATIC_LIBS ON)
else()
# One must add -DBOOST_ALL_DYN_LINK to DEFINITIONS to use Boost
# auto-link with shared libraries.
add_definitions( -DBOOST_ALL_DYN_LINK )
endif()
else() else()
set (COMISO_BOOST_CONFIG_FILE_SETTINGS "#define COMISO_BOOST_AVAILABLE 0" ) set (COMISO_BOOST_CONFIG_FILE_SETTINGS "#define COMISO_BOOST_AVAILABLE 0" )
message (STATUS "Boost not found!") message (STATUS "Boost not found!")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment