Skip to content
Snippets Groups Projects
Commit 27c287ac authored by Kasper Marstal's avatar Kasper Marstal
Browse files

COMP: ELASTIX-10 Add Boost to SuperBuild

parent 2a3a2557
No related branches found
No related tags found
No related merge requests found
......@@ -61,11 +61,12 @@ endif()
# Boost Graph Library
mark_as_advanced( USE_SYSTEM_BOOST )
option( USE_SYSTEM_BOOST "Use an installed version of BOOST" ON )
option( USE_SYSTEM_BOOST "Use an installed version of BOOST" OFF )
if( USE_SYSTEM_BOOST )
find_package( BOOST REQUIRED graph )
else()
message( FATAL_ERROR "BOOST is not yet integrated with the SuperBuild. Install BOOST on your system, set USE_SYSTEM_BOOST to ON and re-run CMake." )
include( ExternalBoost )
list( APPEND ELASTIX_DEPENDENCIES BOOST )
endif()
# ---------------------------------------------------------------------
......
set( PROJECT BOOST )
# Note: It IS important to download different files on different OS's:
# on Unix-like systems, we need the file persmissions (only available in the .tar.gz),
# while on Windows, we need CR/LF line feeds (only available in the .zip)
set( BOOST_CONFIGURE_COMMAND )
if( UNIX )
set( BOOST_URL "http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz")
set( BOOST_MD5 51528a0e3b33d9e10aaa311d9eb451e3 )
set( BOOST_CONFIGURE_COMMAND ./bootstrap.sh )
set( BOOST_BUILD_COMMAND ./b2 )
else()
if( WIN32 )
set( BOOST_URL "http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.zip")
set( BOOST_MD5 08d29a2d85db3ebc8c6fdfa3a1f2b83c )
set( BOOST_CONFIGURE_COMMAND cmd /C bootstrap.bat msvc )
set( BOOST_BUILD_COMMAND b2.exe )
endif()
endif()
set( BOOST_BUILD_DIR "${CMAKE_INSTALL_PREFIX}/${PROJECT}-build/" )
ExternalProject_Add( BOOST
BUILD_IN_SOURCE 1
URL "${BOOST_URL}"
URL_MD5 ${BOOST_MD5}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
--prefix=${BOOST_BUILD_DIR}/lib
BUILD_COMMAND ${BOOST_BUILD_COMMAND} install
--prefix=${BOOST_BUILD_DIR}
--with-graph
--variant=release
--jobs=4
INSTALL_COMMAND ""
)
set( BOOST_ROOT ${BOOST_BUILD_DIR} )
set( proj ITK )
set( PROJECT ITK )
set( ITK_REPOSITORY https://github.com/InsightSoftwareConsortium/ITK.git )
set( ITK_TAG "v${ITK_VERSION_STRING}")
ExternalProject_Add( ${proj}
ExternalProject_Add( ${PROJECT}
GIT_REPOSITORY ${ITK_REPOSITORY}
GIT_TAG ${ITK_TAG}
UPDATE_COMMAND ""
SOURCE_DIR ${proj}
BINARY_DIR ${proj}-build
SOURCE_DIR ${PROJECT}
BINARY_DIR ${PROJECT}-build
CMAKE_ARGS
--no-warn-unused-cli
-DBUILD_EXAMPLES:BOOL=OFF
......@@ -21,4 +21,4 @@ ExternalProject_Add( ${proj}
)
ExternalProject_Get_Property( ITK install_dir )
set( ITK_DIR "${install_dir}/lib/cmake/ITK-${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}" )
\ No newline at end of file
set( ITK_DIR "${install_dir}/lib/cmake/ITK-${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}" )
......@@ -5,6 +5,7 @@
set( ElastixUnitTestFilenames
elxExampleUnitTest.cxx
elxBluePrintTest.cxx
itkRegistration.cxx
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment