Skip to content

Commit

Permalink
work-around issue #455
Browse files Browse the repository at this point in the history
Disable a boost-workaround on WIN32 as it creates problems there.

See #455
  • Loading branch information
KrisThielemans committed Dec 24, 2020
1 parent c8fcffb commit 75281a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions SuperBuild/External_Boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,18 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr
)
endif()

if (NOT WIN32)
# Avoid linking problems with boost system, specifically
# boost::system::detail::generic_category_instance
# by forcing Boost to use an inline variable, as opposed to
# the instantiated variable in the library
# See https://github.com/SyneRBI/SIRF-SuperBuild/issues/161
# However, this solution is flawed as it overrides any system compiler flags, see
# https://github.com/SyneRBI/SIRF-SuperBuild/issues/455
# Probably should check if it's still necessary for recent Boost.
set(Boost_CMAKE_ARGS ${Boost_CMAKE_ARGS}
-DCMAKE_CXX_FLAGS:STRING=-DBOOST_ERROR_CODE_HEADER_ONLY\ -DBOOST_SYSTEM_NO_DEPRECATED)
endif()

mark_as_superbuild(
VARS
Expand Down

0 comments on commit 75281a5

Please sign in to comment.