diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4e9ddc2..6762477 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -48,6 +48,7 @@ jobs: export CC=gcc-11 export CXX=g++-11 export TARGET=all + export CMAKE_BUILD_TYPE=Release cd deps ./build.sh diff --git a/deps/build.sh b/deps/build.sh index 40c2ff0..1352946 100755 --- a/deps/build.sh +++ b/deps/build.sh @@ -578,7 +578,7 @@ then eval "$WGET" https://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/${BOOST_NAME}.tar.bz2 fi echo -e "${COLOR_INFO}unpacking it${COLOR_DOTS}...${COLOR_RESET}" - tar -xf ${BOOST_NAME}.tar.bz2 + tar -xf ${BOOST_NAME}.tar.bz2 fi cd ${BOOST_NAME} echo -e "${COLOR_INFO}configuring and building it${COLOR_DOTS}...${COLOR_RESET}" @@ -595,26 +595,32 @@ then fi eval ./bootstrap.sh --prefix="$INSTALL_ROOT" --with-libraries="$BOOST_LIBRARIES" - if [ ${ARCH} = "arm" ] - then - sed -i -e 's#using gcc ;#using gcc : arm : /usr/local/toolchains/gcc7.2-arm/bin/arm-linux-gnueabihf-g++ ;#g' project-config.jam - eval ./b2 "${CONF_CROSSCOMPILING_OPTS_BOOST}" cxxflags=-fPIC cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --layout=system variant=debug link=static threading=multi install - else - if [ "$UNIX_SYSTEM_NAME" = "Darwin" ]; - then - eval ./b2 cxxflags=-fPIC toolset=clang cxxstd=17 cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --layout=system variant=debug link=static threading=multi install - else - if [[ "${WITH_EMSCRIPTEN}" -eq 1 ]]; - then - eval ./b2 toolset=emscripten cxxflags=-fPIC cxxstd=14 cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --disable-icu --layout=system variant=debug link=static install - cd bin.v2/libs/program_options/build/emscripten-2.0.31/debug/cxxstd-14-iso/link-static/threading-multi/ - eval emar q "libboost_program_options.a" ./*.bc - eval cp "libboost_program_options.a" "${LIBRARIES_ROOT}" - else - eval ./b2 cxxflags=-fPIC cxxstd=14 cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --layout=system variant=debug link=static threading=multi install - fi - fi - fi + if [ "$DEBUG" = "1" ]; then + variant=debug + else + variant=release + fi + + if [ ${ARCH} = "arm" ] + then + sed -i -e 's#using gcc ;#using gcc : arm : /usr/local/toolchains/gcc7.2-arm/bin/arm-linux-gnueabihf-g++ ;#g' project-config.jam + eval ./b2 "${CONF_CROSSCOMPILING_OPTS_BOOST}" cxxflags=-fPIC cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --layout=system variant=${variant} link=static threading=multi install + else + if [ "$UNIX_SYSTEM_NAME" = "Darwin" ]; + then + eval ./b2 cxxflags=-fPIC toolset=clang cxxstd=17 cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --layout=system variant=${variant} link=static threading=multi install + else + if [[ "${WITH_EMSCRIPTEN}" -eq 1 ]]; + then + eval ./b2 toolset=emscripten cxxflags=-fPIC cxxstd=14 cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --disable-icu --layout=system variant=${variant} link=static install + cd bin.v2/libs/program_options/build/emscripten-2.0.31/debug/cxxstd-14-iso/link-static/threading-multi/ + eval emar q "libboost_program_options.a" ./*.bc + eval cp "libboost_program_options.a" "${LIBRARIES_ROOT}" + else + eval ./b2 cxxflags=-fPIC cxxstd=14 cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --layout=system variant=debug link=static threading=multi install + fi + fi + fi cd .. cd "$SOURCES_ROOT" else