Skip to content
This repository has been archived by the owner on Apr 15, 2021. It is now read-only.

Commit

Permalink
#73: Add Boost unit test framework to required Boost libs
Browse files Browse the repository at this point in the history
  • Loading branch information
HLXEasy committed Apr 1, 2021
1 parent 24cf592 commit fcbbaa9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ find_package(Boost 1.72.0 REQUIRED COMPONENTS
regex
system
thread
unit_test_framework
)
message(STATUS "Boost_VERSION: ${Boost_VERSION}")
message(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmake-build-android_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ANDROID_QT_LIBRARYDIR=${ANDROID_QT_DIR}/lib
##### ### # Boost # ### #####################################################
# Location of Boost will be resolved by trying to find required Boost libs
BOOST_ARCHIVE_LOCATION=${ARCHIVES_ROOT_DIR}/Boost
BOOST_REQUIRED_LIBS='chrono filesystem iostreams program_options system thread regex date_time atomic'
BOOST_REQUIRED_LIBS='chrono filesystem iostreams program_options system thread regex date_time atomic test'
# regex date_time atomic

##### ### # Qt # ### ########################################################
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmake-build-android_armv7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ANDROID_QT_LIBRARYDIR=${ANDROID_QT_DIR}/lib
##### ### # Boost # ### #####################################################
# Location of Boost will be resolved by trying to find required Boost libs
BOOST_ARCHIVE_LOCATION=${ARCHIVES_ROOT_DIR}/Boost
BOOST_REQUIRED_LIBS='chrono filesystem iostreams program_options system thread regex date_time atomic'
BOOST_REQUIRED_LIBS='chrono filesystem iostreams program_options system thread regex date_time atomic test'
# regex date_time atomic

##### ### # Qt # ### ########################################################
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmake-build-android_x86-64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ANDROID_QT_LIBRARYDIR=${ANDROID_QT_DIR}/lib
##### ### # Boost # ### #####################################################
# Location of Boost will be resolved by trying to find required Boost libs
BOOST_ARCHIVE_LOCATION=${ARCHIVES_ROOT_DIR}/Boost
BOOST_REQUIRED_LIBS='chrono filesystem iostreams program_options system thread regex date_time atomic'
BOOST_REQUIRED_LIBS='chrono filesystem iostreams program_options system thread regex date_time atomic test'
# regex date_time atomic

##### ### # Qt # ### ########################################################
Expand Down
5 changes: 4 additions & 1 deletion scripts/cmake-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ _init
##### ### # Boost # ### #####################################################
# Location of Boost will be resolved by trying to find required Boost libs
BOOST_ARCHIVE_LOCATION=${ARCHIVES_ROOT_DIR}/Boost
BOOST_REQUIRED_LIBS='chrono filesystem iostreams program_options system thread regex date_time atomic'
BOOST_REQUIRED_LIBS='chrono filesystem iostreams program_options system thread regex date_time atomic test'
# regex date_time atomic

##### ### # BerkeleyDB # ### ################################################
Expand Down Expand Up @@ -406,6 +406,7 @@ buildBoost() {
tar xzf ${BOOST_ARCHIVE_LOCATION}/boost_${BOOST_VERSION//./_}.tar.gz
info " -> Building Boost"
cd boost_${BOOST_VERSION//./_} || die 1 "Unable to cd into boost_${BOOST_VERSION//./_}"
info " ./bootstrap.sh --with-libraries='${BOOST_REQUIRED_LIBS// /,}'"
./bootstrap.sh --with-libraries="${BOOST_REQUIRED_LIBS// /,}"
# ./bootstrap.sh
./b2 \
Expand All @@ -426,6 +427,8 @@ checkBoost() {
for currentBoostDependency in ${BOOST_REQUIRED_LIBS}; do
if [[ -e ${BOOST_LIBRARYDIR}/libboost_${currentBoostDependency}-mt-${LIB_ARCH_SUFFIX}.a ]]; then
info " -> ${currentBoostDependency}: OK"
elif [[ "${currentBoostDependency}" = 'test' && -e ${BOOST_LIBRARYDIR}/libboost_unit_${currentBoostDependency}_framework-mt-${LIB_ARCH_SUFFIX}.a ]]; then
info " -> ${currentBoostDependency}: OK"
else
warning " => ${currentBoostDependency}: Not found!"
boostBuildRequired=true
Expand Down

0 comments on commit fcbbaa9

Please sign in to comment.