Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix boost naming for mac & unix debug builds #2317

Merged
merged 12 commits into from
Dec 20, 2021
12 changes: 10 additions & 2 deletions Superbuild/UseBoost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ if(WIN32)
endif()
set(boost_LIB_PREFIX "lib")
else()
set(DEBUG_POSTFIX "-yd")
if(BUILD_WITH_PYTHON)
set(DEBUG_POSTFIX "-yd")
else()
set(DEBUG_POSTFIX "-d")
endif()
set(boost_LIB_PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX})
if(${arm64Supported})
set(PLATFORM_SUFFIX "a64")
Expand All @@ -39,7 +43,11 @@ foreach(lib ${SCI_BOOST_LIBRARY})
add_library(${lib} STATIC IMPORTED GLOBAL)

if((APPLE OR UNIX) AND CMAKE_BUILD_TYPE MATCHES "Debug")
set(FULL_LIB_NAME "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}${lib}${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
if(${lib} MATCHES "boost_python-mt")
set(FULL_LIB_NAME "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}boost_python${USER_PYTHON_VERSION_MAJOR}${USER_PYTHON_VERSION_MINOR}-mt${DEBUG_POSTFIX}-${PLATFORM_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
else()
set(FULL_LIB_NAME "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}${lib}${DEBUG_POSTFIX}-${PLATFORM_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
endif()
elseif(APPLE OR UNIX)
if(${lib} MATCHES "boost_python-mt")
set(FULL_LIB_NAME "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}boost_python${USER_PYTHON_VERSION_MAJOR}${USER_PYTHON_VERSION_MINOR}-mt-${PLATFORM_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
Expand Down