set minimal boost version; remove #ifdef boost version checks

pull/3024/head
Bret Curtis 4 years ago
parent b66ba7c718
commit 4032b754e4

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

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

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

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

Loading…
Cancel
Save