Commit 4909275a authored by Max Lyon's avatar Max Lyon
Browse files

Merge branch 'fix_use_static_boost-GF' into 'master'

CMake : add the option to use dynamic linking for Boost

It can be useful to link with the dynamic version of Boost libraries

This Merge Request introduces a CMake option (available as a checkbox in the GUI) to make this choice By default, we keep the static version, for backward-compatibility.

See merge request !10
parents b7b79b01 047fed15
Pipeline #1339 passed with stage
......@@ -65,6 +65,17 @@ if(Boost_FOUND)
list( APPEND COMISO_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS} )
list( APPEND COMISO_LINK_DIRECTORIES ${Boost_LIBRARY_DIR} )
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()
set (COMISO_BOOST_CONFIG_FILE_SETTINGS "#define COMISO_BOOST_AVAILABLE 0" )
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