From 4032b754e40bf9865ce7924063caa892424df68f Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Sun, 25 Oct 2020 22:43:10 +0100 Subject: [PATCH] set minimal boost version; remove #ifdef boost version checks --- CMakeLists.txt | 2 +- apps/mwiniimporter/importer.cpp | 7 ------- apps/openmw/main.cpp | 16 ---------------- components/fallback/validate.cpp | 4 ---- 4 files changed, 1 insertion(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82d6694dc..37696f44c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -308,7 +308,7 @@ endif() set(Boost_NO_BOOST_CMAKE ON) -find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS}) +find_package(Boost 1.6.2 REQUIRED COMPONENTS ${BOOST_COMPONENTS}) find_package(MyGUI 3.2.2 REQUIRED) find_package(SDL2 2.0.9 REQUIRED) find_package(OpenAL REQUIRED) diff --git a/apps/mwiniimporter/importer.cpp b/apps/mwiniimporter/importer.cpp index 600b4917a..4670e8948 100644 --- a/apps/mwiniimporter/importer.cpp +++ b/apps/mwiniimporter/importer.cpp @@ -985,14 +985,7 @@ std::time_t MwIniImporter::lastWriteTime(const boost::filesystem::path& filename std::time_t writeTime(defaultTime); if (boost::filesystem::exists(filename)) { - // FixMe: remove #if when Boost dependency for Linux builds updated - // This allows Linux to build until then -#if (BOOST_VERSION >= 104800) - // need to resolve any symlinks so that we get time of file, not symlink boost::filesystem::path resolved = boost::filesystem::canonical(filename); -#else - boost::filesystem::path resolved = filename; -#endif writeTime = boost::filesystem::last_write_time(resolved); // print timestamp diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index adf4bf18c..d3d984901 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -21,22 +21,6 @@ #include #endif -/** - * Workaround for problems with whitespaces in paths in older versions of Boost library - */ -#if (BOOST_VERSION <= 104600) -namespace boost -{ - -template<> -inline boost::filesystem::path lexical_cast(const std::string& arg) -{ - return boost::filesystem::path(arg); -} - -} /* namespace boost */ -#endif /* (BOOST_VERSION <= 104600) */ - using namespace Fallback; diff --git a/components/fallback/validate.cpp b/components/fallback/validate.cpp index 98c6c39fd..982c709af 100644 --- a/components/fallback/validate.cpp +++ b/components/fallback/validate.cpp @@ -14,11 +14,7 @@ void Fallback::validate(boost::any& v, std::vector const& tokens, F std::string temp = Files::EscapeHashString::processString(token); size_t sep = temp.find(","); if (sep < 1 || sep == temp.length() - 1 || sep == std::string::npos) -#if (BOOST_VERSION < 104200) - throw boost::program_options::validation_error("invalid value"); -#else throw boost::program_options::validation_error(boost::program_options::validation_error::invalid_option_value); -#endif std::string key(temp.substr(0, sep)); std::string value(temp.substr(sep + 1));