Commit b3b9e96c authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

Support only one boost build subset, regardless of BUILD_GITHUB_PLUGIN.

This is so builders with multiple out of source build trees can all use
the same common boost install directory.  And the build system will not
vascillate between the fuller and lesser subsets of boost.
parent 5cea9408
Loading
Loading
Loading
Loading
+97 −132
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ set( BOOST_MD5 15cb8c0803064faef0c4ddf5bc5ca279 ) # re-calc this on every RELE
set( BOOST_ROOT "${PROJECT_SOURCE_DIR}/boost_root" )


if( BUILD_GITHUB_PLUGIN )
# Space separated list which indicates the subset of boost libraries to compile.
# Chosen libraries are based on AVHTTP requirements, and possibly
# unit_test_framework for its own worth.
@@ -56,7 +55,6 @@ if( BUILD_GITHUB_PLUGIN )
    thread
    #unit_test_framework
    )
endif()

#-----</configure>---------------------------------------------------------------

@@ -85,10 +83,6 @@ function( set_boost_lib_names libs output )
endfunction()


if( BUILD_GITHUB_PLUGIN )

    # It will probably be simpler to make this the only path in the future.

# (BTW "test" yields "unit_test_framework" when passed to bootstrap.sh ).
#message( STATUS "BOOST_LIBS_BUILT:${BOOST_LIBS_BUILT}" )
string( REPLACE "unit_test_framework" "test" boost_libs_list "${BOOST_LIBS_BUILT}" )
@@ -183,35 +177,6 @@ if( BUILD_GITHUB_PLUGIN )
#message( STATUS "BOOST_ROOT:${BOOST_ROOT}  BOOST_LIBRARIES:${BOOST_LIBRARIES}" )
#message( STATUS "Boost_INCLUDE_DIR: ${Boost_INCLUDE_DIR}" )

else( BUILD_GITHUB_PLUGIN )

    ExternalProject_Add( boost
        PREFIX          "${PREFIX}"
        DOWNLOAD_DIR    "${DOWNLOAD_DIR}"
        URL             http://downloads.sourceforge.net/project/boost/boost/${BOOST_RELEASE}/boost_${BOOST_VERS}.tar.bz2
        URL_MD5         ${BOOST_MD5}

        # The patch command executes with the working directory set to <SOURCE_DIR>
        PATCH_COMMAND   bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost.patch"

        # Dick 18-Aug-2013:
        # [mis-]use this UPDATE_COMMAND opportunity to remove the old place of boost headers.
        # Can eventually remove this step after headers are moved from <kicad_src>/include/boost
        # to <kicad_src>/boost_root/include/boost over the next several months.
        UPDATE_COMMAND  ${CMAKE_COMMAND} -E remove_directory "${PROJECT_SOURCE_DIR}/include/boost"

        CONFIGURE_COMMAND ""

        # remove then re-copy into the include/boost directory during next two steps:
        BUILD_COMMAND   ${CMAKE_COMMAND} -E remove_directory ${BOOST_ROOT}
        INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory "${headers_src}" "${BOOST_ROOT}/include/boost"
        )

    # Until my find_package() support is done for my boost.
    set( Boost_INCLUDE_DIR  "${BOOST_ROOT}/include" CACHE FILEPATH "Boost include directory" )


endif( BUILD_GITHUB_PLUGIN )


ExternalProject_Add_Step( boost bzr_commit_boost