mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 21:39:41 +00:00
set minimal boost version; remove #ifdef boost version checks
This commit is contained in:
parent
b66ba7c718
commit
4032b754e4
4 changed files with 1 additions and 28 deletions
|
@ -308,7 +308,7 @@ endif()
|
||||||
|
|
||||||
set(Boost_NO_BOOST_CMAKE ON)
|
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(MyGUI 3.2.2 REQUIRED)
|
||||||
find_package(SDL2 2.0.9 REQUIRED)
|
find_package(SDL2 2.0.9 REQUIRED)
|
||||||
find_package(OpenAL REQUIRED)
|
find_package(OpenAL REQUIRED)
|
||||||
|
|
|
@ -985,14 +985,7 @@ std::time_t MwIniImporter::lastWriteTime(const boost::filesystem::path& filename
|
||||||
std::time_t writeTime(defaultTime);
|
std::time_t writeTime(defaultTime);
|
||||||
if (boost::filesystem::exists(filename))
|
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);
|
boost::filesystem::path resolved = boost::filesystem::canonical(filename);
|
||||||
#else
|
|
||||||
boost::filesystem::path resolved = filename;
|
|
||||||
#endif
|
|
||||||
writeTime = boost::filesystem::last_write_time(resolved);
|
writeTime = boost::filesystem::last_write_time(resolved);
|
||||||
|
|
||||||
// print timestamp
|
// print timestamp
|
||||||
|
|
|
@ -21,22 +21,6 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#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;
|
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);
|
std::string temp = Files::EscapeHashString::processString(token);
|
||||||
size_t sep = temp.find(",");
|
size_t sep = temp.find(",");
|
||||||
if (sep < 1 || sep == temp.length() - 1 || sep == std::string::npos)
|
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);
|
throw boost::program_options::validation_error(boost::program_options::validation_error::invalid_option_value);
|
||||||
#endif
|
|
||||||
|
|
||||||
std::string key(temp.substr(0, sep));
|
std::string key(temp.substr(0, sep));
|
||||||
std::string value(temp.substr(sep + 1));
|
std::string value(temp.substr(sep + 1));
|
||||||
|
|
Loading…
Reference in a new issue