diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ad790bddcad7d8dde0d33f32750ccac23e38e96..a838014572ca9689b62b75f3d77368071d453296 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -81,6 +81,7 @@ stages: paths: - sb_branch.txt # Needed to checkout correct branch in build step - build/*/*/*/*.log # Superbuild log + - build/*/*/*/*.cmake #-------------------------- precheck job --------------------------------------- fast-build: diff --git a/SuperBuild/CMake/External_boost.cmake b/SuperBuild/CMake/External_boost.cmake index a2d44ea89b121c10be27bb1b1d74b34dcd0e8c2d..edd73c86b09dd7b68cfa622f67947722e81e7f5f 100644 --- a/SuperBuild/CMake/External_boost.cmake +++ b/SuperBuild/CMake/External_boost.cmake @@ -22,41 +22,12 @@ INCLUDE_ONCE_MACRO(BOOST) SETUP_SUPERBUILD(BOOST) -set(_SB_BOOST_LIBRARYDIR ${SB_INSTALL_PREFIX}/lib) - -set(BOOST_SB_CONFIG) -if(OTB_TARGET_SYSTEM_ARCH_IS_X64) - set(BOOST_SB_CONFIG address-model=64) -endif() - -set(BOOST_SB_CONFIG - ${BOOST_SB_CONFIG} - variant=release - link=shared - threading=multi - runtime-link=shared - --prefix=${SB_INSTALL_PREFIX} - --includedir=${SB_INSTALL_PREFIX}/include - --libdir=${_SB_BOOST_LIBRARYDIR} - --with-system - --with-serialization - --with-filesystem - --with-test - --with-date_time - --with-program_options - --with-thread - ) - -set(BOOST_BOOTSTRAP_OPTIONS "") - if(UNIX) set(BOOST_BOOTSTRAP_FILE "./bootstrap.sh") set(BOOST_B2_EXE "./b2") if(NOT APPLE AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set(BOOST_SB_CONFIG - ${BOOST_SB_CONFIG} - toolset=clang) - set(BOOST_BOOTSTRAP_OPTIONS "--with-toolset=clang") + set(BOOST_BOOTSTRAP_OPTIONS "${BOOST_BOOTSTRAP_OPTIONS} --with-toolset=clang") + set(BOOST_SB_CONFIG toolset=clang) endif() else() set(BOOST_BOOTSTRAP_FILE "bootstrap.bat") @@ -66,8 +37,47 @@ endif() set(BOOST_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E chdir ${BOOST_SB_SRC} ${BOOST_BOOTSTRAP_FILE} ${BOOST_BOOTSTRAP_OPTIONS} + ) + +# We cannot configure and bootstrap boost properly. Every configuration stuff +# must be passed to b2. Why? Windows... That is why... +# Libraries we need from boost +set( boost_libraries_to_build "system;serialization;filesystem;test;date_time;program_options;thread") +# add libraries to b2 option +set(BOOST_SB_CONFIG) +foreach(lib ${boost_libraries_to_build}) + set(BOOST_SB_CONFIG + ${BOOST_SB_CONFIG} + --with-${lib}) +endforeach(lib) + +# This is needed because otherwise boost is building both x32 and x64 lib +# (on wndows) and during packages on win32 we are installing all libs. +# See Packaging/install_importlibs.cmake + +if ( WIN32 ) + if(OTB_TARGET_SYSTEM_ARCH_IS_X64) + set(BOOST_SB_CONFIG + ${BOOST_SB_CONFIG} + address-model=64) + else() + set(BOOST_SB_CONFIG + ${BOOST_SB_CONFIG} + address-model=32) + endif() +endif() + +set(BOOST_SB_CONFIG + ${BOOST_SB_CONFIG} + variant=release + link=shared + threading=multi + runtime-link=shared --prefix=${SB_INSTALL_PREFIX} ) + # set(_SB_BOOST_LIBRARYDIR ${SB_INSTALL_PREFIX}/lib) + # --includedir=${SB_INSTALL_PREFIX}/include #This is the default in boost + # --libdir=${_SB_BOOST_LIBRARYDIR} # same here set(BOOST_BUILD_COMMAND ${CMAKE_COMMAND} -E chdir ${BOOST_SB_SRC} @@ -79,8 +89,8 @@ set(BOOST_BUILD_COMMAND ${CMAKE_COMMAND} #NOTE: update _SB_Boost_INCLUDE_DIR below when you change version number ExternalProject_Add(BOOST PREFIX BOOST - URL "http://downloads.sourceforge.net/project/boost/boost/1.60.0/boost_1_60_0.tar.bz2" - URL_MD5 65a840e1a0b13a558ff19eeb2c4f0cbe + URL "http://downloads.sourceforge.net/project/boost/boost/1.69.0/boost_1_69_0.tar.bz2" + URL_MD5 a1332494397bf48332cb152abfefcec2 BINARY_DIR ${BOOST_SB_BUILD_DIR} INSTALL_DIR ${SB_INSTALL_PREFIX} DOWNLOAD_DIR ${DOWNLOAD_LOCATION} @@ -96,7 +106,7 @@ ExternalProject_Add(BOOST #HINT: avoid all uses of _SB_* in External_<project>.cmake # and depend on much saner CMAKE_PREFIX_PATH for cmake projects. if(MSVC) - set(_SB_Boost_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include/boost-1_60) + set(_SB_Boost_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include/boost-1_69) else() set(_SB_Boost_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include) endif() diff --git a/SuperBuild/CMake/External_font.cmake b/SuperBuild/CMake/External_font.cmake index 14f5b415483d8018187a403b9d53e5d9cc8d9dd0..58109160892a4bf39b741b49748a7e05e1c5dacf 100644 --- a/SuperBuild/CMake/External_font.cmake +++ b/SuperBuild/CMake/External_font.cmake @@ -30,11 +30,10 @@ if ( EXISTS "${DOWNLOAD_LOCATION}/dejavu-fonts-ttf-2.37.tar.bz2" ) file( MD5 "${DOWNLOAD_LOCATION}/dejavu-fonts-ttf-2.37.tar.bz2" MD5_FONT ) endif() -SET(CMAKE_TLS_VERIFY "OFF") if ( NOT ( "${MD5_FONT}" STREQUAL "d0efec10b9f110a32e9b8f796e21782c" ) ) MESSAGE("DOWNLOADING FONTS") file(DOWNLOAD - "https://netix.dl.sourceforge.net/project/dejavu/dejavu/2.37/dejavu-fonts-ttf-2.37.tar.bz2" + "https://sourceforge.net/projects/dejavu/files/dejavu/2.37/dejavu-fonts-ttf-2.37.tar.bz2" ${DOWNLOAD_LOCATION}/dejavu-fonts-ttf-2.37.tar.bz2 EXPECTED_MD5 d0efec10b9f110a32e9b8f796e21782c) endif() diff --git a/SuperBuild/patches/BOOST/boost-2-fix_quadmath-linux.diff b/SuperBuild/patches/BOOST/boost-2-fix_quadmath-linux.diff deleted file mode 100755 index 164cbacc66a4edaeb60a3396689cebdc127f1bd0..0000000000000000000000000000000000000000 --- a/SuperBuild/patches/BOOST/boost-2-fix_quadmath-linux.diff +++ /dev/null @@ -1,77 +0,0 @@ -This patch is taken from boostorg github. -https://github.com/boostorg/math/commit/74ff2db959c5fa75bec770c41ed2951a740fe936.diff - -diff --git a/include/boost/math/special_functions/fpclassify.hpp b/include/boost/math/special_functions/fpclassify.hpp -index 0a4e1ac..58fad13 100644 ---- a/boost/math/special_functions/fpclassify.hpp -+++ b/boost/math/special_functions/fpclassify.hpp -@@ -81,7 +81,12 @@ is used. - #include <float.h> - #endif - #ifdef BOOST_MATH_USE_FLOAT128 -+#ifdef __has_include -+#if __has_include("quadmath.h") - #include "quadmath.h" -+#define BOOST_MATH_HAS_QUADMATH_H -+#endif -+#endif - #endif - - #ifdef BOOST_NO_STDC_NAMESPACE -@@ -124,9 +129,14 @@ inline bool is_nan_helper(T, const boost::false_type&) - { - return false; - } --#ifdef BOOST_MATH_USE_FLOAT128 -+#if defined(BOOST_MATH_USE_FLOAT128) -+#if defined(BOOST_MATH_HAS_QUADMATH_H) - inline bool is_nan_helper(__float128 f, const boost::true_type&) { return ::isnanq(f); } - inline bool is_nan_helper(__float128 f, const boost::false_type&) { return ::isnanq(f); } -+#else -+inline bool is_nan_helper(__float128 f, const boost::true_type&) { return ::isnan(static_cast<double>(f)); } -+inline bool is_nan_helper(__float128 f, const boost::false_type&) { return ::isnan(static_cast<double>(f)); } -+#endif - #endif - } - -@@ -519,7 +529,7 @@ inline bool (isinf)(long double x) - return detail::isinf_impl(static_cast<value_type>(x), method()); - } - #endif --#ifdef BOOST_MATH_USE_FLOAT128 -+#if defined(BOOST_MATH_USE_FLOAT128) && defined(BOOST_MATH_HAS_QUADMATH_H) - template<> - inline bool (isinf)(__float128 x) - { -@@ -611,7 +621,7 @@ inline bool (isnan)(long double x) - return detail::isnan_impl(x, method()); - } - #endif --#ifdef BOOST_MATH_USE_FLOAT128 -+#if defined(BOOST_MATH_USE_FLOAT128) && defined(BOOST_MATH_HAS_QUADMATH_H) - template<> - inline bool (isnan)(__float128 x) - { -diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp -index ffd0ab4..75d29b6 100644 ---- a/boost/math/tools/config.hpp -+++ b/boost/math/tools/config.hpp -@@ -265,18 +265,6 @@ - # define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF - #endif - // --// Test whether to support __float128, if we don't have quadmath.h then this can't currently work: --// --#ifndef BOOST_MATH_USE_FLOAT128 --#ifdef __has_include --#if ! __has_include("quadmath.h") --#define BOOST_MATH_DISABLE_FLOAT128 --#endif --#elif !defined(BOOST_ARCH_X86) --#define BOOST_MATH_DISABLE_FLOAT128 --#endif --#endif --// - // And then the actual configuration: - // - #if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__) \ diff --git a/SuperBuild/patches/BOOST/boost-2-timerheader-all.diff b/SuperBuild/patches/BOOST/boost-2-timerheader-all.diff new file mode 100644 index 0000000000000000000000000000000000000000..58d46451364a25989a5be9a2f39994736ed15553 --- /dev/null +++ b/SuperBuild/patches/BOOST/boost-2-timerheader-all.diff @@ -0,0 +1,29 @@ +--- boost_1_69_0.orig/libs/test/build/Jamfile.v2 ++++ boost_1_69_0/libs/test/build/Jamfile.v2 +@@ -7,7 +7,7 @@ + import os ; + + import ../../predef/check/predef +- : check ++ : check + : predef-check ; + + project boost/test +@@ -25,17 +25,10 @@ project boost/test + <warnings>all + # <warnings-as-errors>on + +- # adding a dependency on boost/timer as the header are needed, and the junction needs +- # to be there in order to build the library. +- <library>/boost/timer//boost_timer + : usage-requirements + <define>BOOST_TEST_NO_AUTO_LINK=1 + # Disable Warning about boost::noncopyable not being exported + <link>shared,<toolset>msvc:<cxxflags>-wd4275 +- +- # Adding a dependency on boost/timer as the headers need to be there in case of the +- # header-only usage variant +- <use>/boost/timer//boost_timer + ; + + PRG_EXEC_MON_SOURCES =