diff options
author | Naios <naios-dev@live.de> | 2017-02-27 22:31:05 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2019-08-17 20:04:14 +0200 |
commit | 5add0c004e108033dea895b909fa35335b61830a (patch) | |
tree | 6d3426cf4e3afd8fde16b27ebe79756a5a18ae9f /dep/boost | |
parent | 6f1b13e5c44dd1917cf5eae401bd061e1a2ff9c4 (diff) |
Dep: Use the anonymous namespace free definition of `boost::none`.
* Fixes MSVC linking errors after the recent changes:
"class boost::none_t const & const boost::`anonymous namespace'
::none" (?none@?A0x518851d0@boost@@3AEBVnone_t@2@EB)
already defined in scripts_commands.lib...
* Sets the required version of boost on windows to 1.66
according to the wiki.
(cherrypicked from 3da60f84000bd7ffa5a1516839b84cdee4764448)
Diffstat (limited to 'dep/boost')
-rw-r--r-- | dep/boost/CMakeLists.txt | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/dep/boost/CMakeLists.txt b/dep/boost/CMakeLists.txt index 0eef00501f3..58f93b2a2cc 100644 --- a/dep/boost/CMakeLists.txt +++ b/dep/boost/CMakeLists.txt @@ -37,10 +37,17 @@ check_cxx_source_compiles(" int main() { std::wregex r(L\".*\"); }" STD_HAS_WORKING_WREGEX) +if (WIN32) + # On windows the requirements are higher according to the wiki. + set(BOOST_REQUIRED_VERSION 1.66) +else() + set(BOOST_REQUIRED_VERSION 1.58) +endif() + if (STD_HAS_WORKING_WREGEX) - find_package(Boost 1.58 REQUIRED system filesystem thread program_options iostreams) + find_package(Boost ${BOOST_REQUIRED_VERSION} REQUIRED system filesystem thread program_options iostreams) else() - find_package(Boost 1.58 REQUIRED system filesystem thread program_options iostreams regex) + find_package(Boost ${BOOST_REQUIRED_VERSION} REQUIRED system filesystem thread program_options iostreams regex) endif() # Find if Boost was compiled in C++03 mode because it requires -DBOOST_NO_CXX11_SCOPED_ENUMS @@ -72,6 +79,9 @@ target_compile_definitions(boost -DBOOST_DATE_TIME_NO_LIB -DBOOST_REGEX_NO_LIB -DBOOST_CHRONO_NO_LIB + # Due to MSVC linking error boost::none" already defined in scripts_... + # May be removed when the requirement is raised to boost 1.61 on windows. + -DBOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE -DBOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE -DBOOST_ASIO_NO_DEPRECATED) |