Dependency on Boost #7157
Answered
by
afabri
petrasvestartas
asked this question in
Q&A
Dependency on Boost
#7157
-
Hi, I am using Boost as a dependency to CGAL via CMake. Is there any better and faster way that writing this? ########################################################################
# BOOST
########################################################################
if (WIN32)
set(BOOST_BOOTSTRAP_CMD ${CMAKE_CURRENT_BINARY_DIR}/boost-prefix/src/boost/bootstrap.bat)
set(BOOST_BUILD_CMD ${CMAKE_CURRENT_BINARY_DIR}/boost-prefix/src/boost/b2.exe)
elseif (UNIX)
set(BOOST_BOOTSTRAP_CMD ${CMAKE_CURRENT_BINARY_DIR}/boost-prefix/src/boost/bootstrap.sh)
set(BOOST_BUILD_CMD ${CMAKE_CURRENT_BINARY_DIR}/boost-prefix/src/boost/b2)
endif ()
ExternalProject_Add(boost
GIT_REPOSITORY https://github.com/boostorg/boost.git
GIT_TAG boost-1.78.0
CONFIGURE_COMMAND ${BOOST_BOOTSTRAP_CMD}
BUILD_COMMAND
${BOOST_BUILD_CMD}
--prefix=${CMAKE_BINARY_DIR}/install/boost
-sZLIB_LIBRARY_PATH=${CMAKE_BINARY_DIR}/install/boost/lib
--without-python
address-model=64
variant=debug,release
link=shared
runtime-link=shared
threading=multi
install
BUILD_IN_SOURCE 1
INSTALL_COMMAND ""
#SOURCE_DIR "${CMAKE_BINARY_DIR}/install/boost" #install directory is in build/install/eigen
) |
Beta Was this translation helpful? Give feedback.
Answered by
afabri
Jan 3, 2023
Replies: 1 comment 1 reply
-
No need to compile everything. In fact almost all of CGAL only needs header only parts of boost. With older versions of VC++ there was a need for boost.thread and its dependencies. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
petrasvestartas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No need to compile everything. In fact almost all of CGAL only needs header only parts of boost. With older versions of VC++ there was a need for boost.thread and its dependencies.