Skip to content

Commit

Permalink
Bump required Boost to 1.50.0
Browse files Browse the repository at this point in the history
  • Loading branch information
K-ballo committed Apr 16, 2016
1 parent b04e1bd commit 36aa1a8
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 57 deletions.
10 changes: 0 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1623,16 +1623,6 @@ install( # Install external dependencies
FILES_MATCHING PATTERN "*.hpp"
PATTERN ".git" EXCLUDE)

if(Boost_VERSION LESS 104900)
# Install Boost.Serialization patch for older Boost versions only
install(
DIRECTORY external/serialization/boost
DESTINATION include/hpx/external
COMPONENT core
FILES_MATCHING PATTERN "*.hpp"
PATTERN ".git" EXCLUDE)
endif()

if("${HPX_PLATFORM_UC}" STREQUAL "XEONPHI")
# FIXME: push changes upstream
install(
Expand Down
8 changes: 4 additions & 4 deletions docs/manual/build_system/prerequisites.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ work, but we do not test __hpx__ with other platforms, so please be warned.
In the simplest case, __hpx__ depends on one set of libraries: __boost__. So,
before you read further, please make sure you have a recent version of
__boost__ installed on your target machine. __hpx__ currently requires at least
Boost V1.47.0 to work properly. It may build and run with older versions, but
Boost V1.50.0 to work properly. It may build and run with older versions, but
we do not test __hpx__ with those versions, so please be warned.

Installing the Boost libraries is described in detail in Boost's own
Expand Down Expand Up @@ -63,7 +63,7 @@ favorite compiler with __hpx__ visit __stellar_hpx_buildbot__.
[[__cmake__ ][3.1 ][2.8.10 ]]

[[[*Required Libraries]]]
[[__boost_libraries__ ][1.57.0 or newer ][1.49.0 ]
[[__boost_libraries__ ][1.57.0 or newer ][1.50.0 ]
[See below for an important limitation when using Boost V1.54.0.]]
[[__hwloc__ ][1.10 ][1.2 (Xeon Phi: 1.6)]
[Used for OS-thread pinning and NUMA awareness. This library is optional on Mac OSX.]]
Expand Down Expand Up @@ -101,8 +101,8 @@ favorite compiler with __hpx__ visit __stellar_hpx_buildbot__.

[note You need to build the following Boost libraries for __hpx__:
Boost.DateTime, Boost.Filesystem, Boost.ProgramOptions, Boost.Regex,
Boost.Serialization, Boost.System, Boost.Thread, Boost.Chrono (starting
Boost 1.49.0), and Boost.Atomic (starting Boost 1.53.0). ]
Boost.Serialization, Boost.System, Boost.Thread, Boost.Chrono, and
Boost.Atomic (starting Boost 1.53.0). ]

[important Because of a problem in Boost V1.55.0 this version can't be used
for compiling __hpx__ if you use MSVC2013. Please use either
Expand Down
5 changes: 5 additions & 0 deletions hpx/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@

#include <boost/version.hpp>

#if BOOST_VERSION < 105000
// Please update your Boost installation (see www.boost.org for details).
#error HPX cannot be compiled with a Boost version earlier than 1.50.0
#endif

#if BOOST_VERSION == 105400
#include <cstdint> // Boost.Atomic has trouble finding [u]intptr_t
#endif
Expand Down
5 changes: 0 additions & 5 deletions hpx/hpx_fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
#include <boost/config.hpp>
#include <boost/version.hpp>

#if BOOST_VERSION < 104900
// Please update your Boost installation (see www.boost.org for details).
#error HPX cannot be compiled with a Boost version earlier than V1.49.
#endif

#if defined(HPX_WINDOWS)
#if !defined(WIN32)
# define WIN32
Expand Down
7 changes: 0 additions & 7 deletions hpx/runtime/threads/policies/scheduler_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,10 @@ namespace hpx { namespace threads { namespace policies
#if defined(HPX_HAVE_THREAD_MANAGER_IDLE_BACKOFF)
// Put this thread to sleep for some time, additionally it gets
// woken up on new work.
#if BOOST_VERSION < 105000
boost::posix_time::millisec period(++wait_count_);

boost::unique_lock<boost::mutex> l(mtx_);
cond_.timed_wait(l, period);
#else
boost::chrono::milliseconds period(++wait_count_);

boost::unique_lock<boost::mutex> l(mtx_);
cond_.wait_for(l, period);
#endif
#endif
}

Expand Down
24 changes: 4 additions & 20 deletions hpx/util/filesystem_compatibility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@

namespace hpx { namespace util
{
#if BOOST_VERSION >= 105000
#define HPX_FILESYSTEM3 filesystem
#else
#define HPX_FILESYSTEM3 filesystem3
#endif

///////////////////////////////////////////////////////////////////////////////
// filesystem wrappers allowing to handle different Boost versions
#if !defined(BOOST_FILESYSTEM_NO_DEPRECATED)
Expand Down Expand Up @@ -76,21 +70,13 @@ namespace hpx { namespace util
inline boost::filesystem::path complete_path(
boost::filesystem::path const& p)
{
#if BOOST_FILESYSTEM_VERSION >= 3
return boost::HPX_FILESYSTEM3::complete(p, initial_path());
#else
return boost::filesystem::complete(p, initial_path());
#endif
}

inline boost::filesystem::path complete_path(
boost::filesystem::path const& p, boost::filesystem::path const& base)
{
#if BOOST_FILESYSTEM_VERSION >= 3
return boost::HPX_FILESYSTEM3::complete(p, base);
#else
return boost::filesystem::complete(p, base);
#endif
}

#else
Expand All @@ -99,7 +85,7 @@ namespace hpx { namespace util
inline boost::filesystem::path initial_path()
{
#if BOOST_FILESYSTEM_VERSION >= 3
return boost::HPX_FILESYSTEM3::detail::initial_path();
return boost::filesystem::detail::initial_path();
#else
return boost::filesystem::initial_path<boost::filesystem::path>();
#endif
Expand All @@ -108,7 +94,7 @@ namespace hpx { namespace util
inline boost::filesystem::path current_path()
{
#if BOOST_FILESYSTEM_VERSION >= 3
return boost::HPX_FILESYSTEM3::current_path();
return boost::filesystem::current_path();
#else
return boost::filesystem::current_path<boost::filesystem::path>();
#endif
Expand Down Expand Up @@ -165,7 +151,7 @@ namespace hpx { namespace util
}
#endif

#if BOOST_VERSION <= 104900 || BOOST_FILESYSTEM_VERSION < 3
#if BOOST_FILESYSTEM_VERSION < 3
inline boost::filesystem::path resolve(
boost::filesystem::path const& p,
boost::filesystem::path const& base = current_path())
Expand Down Expand Up @@ -207,14 +193,12 @@ namespace hpx { namespace util
inline boost::filesystem::path canonical_path(
boost::filesystem::path const& p, boost::system::error_code& ec)
{
#if BOOST_VERSION > 104900 && BOOST_FILESYSTEM_VERSION >= 3
#if BOOST_FILESYSTEM_VERSION >= 3
return boost::filesystem::canonical(p, initial_path(), ec);
#else
return resolve(p, initial_path());
#endif
}

#undef HPX_FILESYSTEM3
}}

#endif
5 changes: 0 additions & 5 deletions hpx/util/logging/writer/on_dedicated_thread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,7 @@ struct on_dedicated_thread
static void do_sleep (int sleep_ms) {
const int NANOSECONDS_PER_SECOND = 1000 * 1000 * 1000;
boost::xtime to_wait;
#if BOOST_VERSION < 105000
xtime_get(&to_wait, boost::TIME_UTC);
#else
// V1.50 changes the name of boost::TIME_UTC
xtime_get(&to_wait, boost::TIME_UTC_);
#endif
to_wait.sec += sleep_ms / 1000;
to_wait.nsec += (sleep_ms % 1000) * (NANOSECONDS_PER_SECOND / 1000);
to_wait.sec += to_wait.nsec / NANOSECONDS_PER_SECOND ;
Expand Down
6 changes: 0 additions & 6 deletions tests/unit/lcos/local_mutex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ struct test_lock_times_out_if_other_thread_has_lock
}
};

#if BOOST_VERSION >= 105000 // 1.49 has old timed lock interface
template <typename M>
struct test_timedlock
{
Expand Down Expand Up @@ -263,7 +262,6 @@ struct test_timedlock
HPX_TEST(!lock);
}
};
#endif

template <typename M>
struct test_recursive_lock
Expand All @@ -287,11 +285,9 @@ void test_mutex()

void test_timed_mutex()
{
#if BOOST_VERSION >= 105000 // 1.49 has old timed lock interface
test_lock<hpx::lcos::local::timed_mutex>()();
test_trylock<hpx::lcos::local::timed_mutex>()();
test_timedlock<hpx::lcos::local::timed_mutex>()();
#endif
}

//void test_recursive_mutex()
Expand All @@ -303,12 +299,10 @@ void test_timed_mutex()
//
//void test_recursive_timed_mutex()
//{
//#if BOOST_VERSION >= 105000 // 1.49 has old timed lock interface
// test_lock<hpx::lcos::local::recursive_timed_mutex()();
// test_trylock<hpx::lcos::local::recursive_timed_mutex()();
// test_timedlock<hpx::lcos::local::recursive_timed_mutex()();
// test_recursive_lock<hpx::lcos::local::recursive_timed_mutex()();
//#endif
//}

///////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 36aa1a8

Please sign in to comment.