build_environment: remove msvc compiler warning from boost.
authorRay Molenkamp <github@lazydodo.com>
Sat, 17 Mar 2018 18:47:17 +0000 (12:47 -0600)
committerRay Molenkamp <github@lazydodo.com>
Sat, 17 Mar 2018 18:47:17 +0000 (12:47 -0600)
Even the boost people have given up trying to keep up with the rapid release
of new msvc versions, and have removed the warn for now see: https://github.com/boostorg/config/commit/5ad0730630188b55e2ee554dec53b5498fc0a030#diff-eac863c1d46c77471e54e8818aab7534

build_files/build_environment/cmake/boost.cmake
build_files/build_environment/patches/boost.diff [new file with mode: 0644]

index 2c6bf19..46840b7 100644 (file)
@@ -53,17 +53,20 @@ if(WIN32)
        if(BUILD_MODE STREQUAL Release)
                set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_60/ ${HARVEST_TARGET}/boost/include/)
        endif()
+       set(BOOST_PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/boost/src/external_boost < ${PATCH_DIR}/boost.diff)
 
 elseif(APPLE)
        set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
        set(BOOST_BUILD_COMMAND ./bjam)
        set(BOOST_BUILD_OPTIONS toolset=clang cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} --disable-icu boost.locale.icu=off)
        set(BOOST_HARVEST_CMD echo .)
+       set(BOOST_PATCH_COMMAND echo .)
 else()
        set(BOOST_HARVEST_CMD echo .)
        set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
        set(BOOST_BUILD_COMMAND ./bjam)
        set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
+       set(BOOST_PATCH_COMMAND echo .)
 endif()
 
 set(BOOST_OPTIONS
@@ -96,6 +99,7 @@ ExternalProject_Add(external_boost
        URL_HASH MD5=${BOOST_MD5}
        PREFIX ${BUILD_DIR}/boost
        UPDATE_COMMAND  ""
+       PATCH_COMMAND ${BOOST_PATCH_COMMAND}
        CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
        BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} variant=${BOOST_BUILD_TYPE} link=static threading=multi ${BOOST_OPTIONS}    --prefix=${LIBDIR}/boost install
        BUILD_IN_SOURCE 1
diff --git a/build_files/build_environment/patches/boost.diff b/build_files/build_environment/patches/boost.diff
new file mode 100644 (file)
index 0000000..ea3ec03
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/boost/config/compiler/visualc.hpp       2015-12-08 11:55:19 -0700
++++ b/boost/config/compiler/visualc.hpp    2018-03-17 10:29:52 -0600
+@@ -287,12 +287,3 @@
+ #  define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
+ #endif
+
+-//
+-// last known and checked version is 19.00.23026 (VC++ 2015 RTM):
+-#if (_MSC_VER > 1900)
+-#  if defined(BOOST_ASSERT_CONFIG)
+-#     error "Unknown compiler version - please run the configure tests and report the results"
+-#  else
+-#     pragma message("Unknown compiler version - please run the configure tests and report the results")
+-#  endif
+-#endif