1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Merge branch 'boost_min_ver' into 'master'

set minimal boost version; remove #ifdef boost version checks

See merge request OpenMW/openmw!376
This commit is contained in:
psi29a 2020-10-26 08:13:24 +00:00
commit fa9278e25b
4 changed files with 1 additions and 28 deletions

View File

@ -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)

View File

@ -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

View File

@ -21,22 +21,6 @@
#include <unistd.h>
#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<boost::filesystem::path, std::string>(const std::string& arg)
{
return boost::filesystem::path(arg);
}
} /* namespace boost */
#endif /* (BOOST_VERSION <= 104600) */
using namespace Fallback;

View File

@ -14,11 +14,7 @@ void Fallback::validate(boost::any& v, std::vector<std::string> 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));