@ -87,21 +87,27 @@ if( BUILD_GITHUB_PLUGIN )
# I t w i l l p r o b a b l y b e s i m p l e r t o m a k e t h i s t h e o n l y p a t h i n t h e f u t u r e .
# ( B T W " t e s t " y i e l d s " u n i t _ t e s t _ f r a m e w o r k " w h e n p a s s e d t o b o o t s t r a p . { s h , b a t } ) .
# ( B T W " t e s t " y i e l d s " u n i t _ t e s t _ f r a m e w o r k " w h e n p a s s e d t o b o o t s t r a p . s h ) .
# message ( STATUS "BOOST_LIBS_BUILT:${BOOST_LIBS_BUILT}" )
string ( REPLACE "unit_test_framework" "test" libs_csv "${BOOST_LIBS_BUILT}" )
# message ( STATUS "REPLACE libs_csv:${libs_csv}" )
string ( REGEX REPLACE "\\;" "," libs_csv "${libs_csv}" )
# message ( STATUS "libs_csv:${libs_csv}" )
string ( REPLACE "unit_test_framework" "test" boost_libs_list "${BOOST_LIBS_BUILT}" )
# message ( STATUS "REPLACE libs_csv:${boost_libs_list}" )
if ( MINGW )
set ( bootstrap "bootstart.bat mingw" )
set ( bootstrap bootstrap.bat mingw )
foreach ( lib ${ boost_libs_list } )
set ( b2_libs ${ b2_libs } --with- ${ lib } )
endforeach ( )
unset ( PIC_STUFF )
else ( )
set ( bootstrap bootstrap.sh )
string ( REGEX REPLACE "\\;" "," libs_csv "${boost_libs_list}" )
# message ( STATUS "libs_csv:${libs_csv}" )
set ( bootstrap bootstrap.sh --with-libraries= ${ libs_csv } )
# p a s s t o * b o t h * C a n d C + + c o m p i l e r s
set ( PIC_STUFF "cflags=${PIC_FLAG}" )
set ( BOOST_INCLUDE "${BOOST_ROOT}/include" )
unset ( b2_libs )
endif ( )
ExternalProject_Add ( boost
@ -120,13 +126,13 @@ if( BUILD_GITHUB_PLUGIN )
B I N A R Y _ D I R " $ { P R E F I X } / s r c / b o o s t / "
C O N F I G U R E _ C O M M A N D . / $ { b o o t s t r a p }
- - w i t h - l i b r a r i e s = $ { l i b s _ c s v }
B U I L D _ C O M M A N D . / b 2
v a r i a n t = r e l e a s e
t h r e a d i n g = m u l t i
t o o l s e t = g c c
$ { P I C _ S T U F F }
$ { b 2 _ l i b s }
# l i n k = s t a t i c
- - p r e f i x = < I N S T A L L _ D I R >
i n s t a l l
@ -134,12 +140,35 @@ if( BUILD_GITHUB_PLUGIN )
I N S T A L L _ C O M M A N D " "
)
if ( MINGW )
execute_process ( COMMAND ${ CMAKE_C_COMPILER } -dumpversion
O U T P U T _ V A R I A B L E G C C _ V E R S I O N
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E )
string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.[0-9]+.*" "\\1\\2" BOOST_GCC_VERSION ${ GCC_VERSION } )
# message ( STATUS "BOOST_GCC_VERSION: ${BOOST_GCC_VERSION}" )
string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9])" "\\1_\\2" BOOST_LIB_VERSION ${ BOOST_RELEASE } )
# message ( STATUS "BOOST_LIB_VERSION: ${BOOST_LIB_VERSION}" )
# a d j u s t t h e n a m e s o f t h e l i b r a r i e s t o s u i t t h e b u i l d . T h e r e ' s n o
# s y m b o l i c l i n k s p r o v i d e d o n t h e M i n G W b u i l d t o a l l o w u s t o u s e
# g e n e r i c n a m e s f o r t h e l i b s
foreach ( lib ${ BOOST_LIBS_BUILT } )
set ( mingw_boost_libs ${ mingw_boost_libs } ${ lib } -mgw ${ BOOST_GCC_VERSION } -mt- ${ BOOST_LIB_VERSION } )
endforeach ( )
set ( BOOST_LIBS_BUILT ${ mingw_boost_libs } )
set ( BOOST_INCLUDE "${BOOST_ROOT}/include/boost-${BOOST_LIB_VERSION}" )
unset ( mingw_boost_libs )
endif ( )
set ( boost_libs "" )
set_boost_lib_names ( "${BOOST_LIBS_BUILT}" boost_libs )
# message ( STATUS "BOOST_ROOT:${BOOST_ROOT} boost_libs:${boost_libs}" )
set ( Boost_LIBRARIES ${ boost_libs } CACHE FILEPATH "Boost libraries directory" )
set ( Boost_INCLUDE_DIR "${BOOST_ROOT}/include" CACHE FILEPATH "Boost include directory" )
set ( Boost_LIBRARIES ${ boost_libs } CACHE FILEPATH "Boost libraries directory" )
set ( Boost_INCLUDE_DIR "${BOOST_INCLUDE} " CACHE FILEPATH "Boost include directory" )
# message ( STATUS "Boost_INCLUDE_DIR: ${Boost_INCLUDE_DIR}" )
else ( BUILD_GITHUB_PLUGIN )