Skip to content

Commit

Permalink
Merge pull request #1877 from STEllAR-GROUP/remove_boost_config
Browse files Browse the repository at this point in the history
Removing most usage of Boost.Config
  • Loading branch information
sithhell committed Dec 17, 2015
2 parents 5e00207 + b85d9fd commit 5b4e47d
Show file tree
Hide file tree
Showing 335 changed files with 1,135 additions and 1,507 deletions.
16 changes: 16 additions & 0 deletions CMakeLists.txt
Expand Up @@ -729,6 +729,9 @@ hpx_add_config_define(BOOST_RESULT_OF_USE_DECLTYPE)
hpx_check_for_cxx11_decltype_n3276(
DEFINITIONS HPX_HAVE_CXX11_DECLTYPE_N3276)

hpx_check_for_cxx11_sfinae_expression(
DEFINITIONS HPX_HAVE_CXX11_SFINAE_EXPRESSION)

hpx_check_for_cxx11_defaulted_functions(
DEFINITIONS HPX_HAVE_CXX11_DEFAULTED_FUNCTIONS)

Expand Down Expand Up @@ -778,9 +781,15 @@ hpx_check_for_cxx11_extended_friend_declarations(
DEFINITIONS HPX_HAVE_CXX11_EXTENDED_FRIEND_DECLARATIONS)

# Check the availability of certain C++11 library features
hpx_check_for_cxx11_std_array(
DEFINITIONS HPX_HAVE_CXX11_STD_ARRAY)

hpx_check_for_cxx11_std_chrono(
DEFINITIONS HPX_HAVE_CXX11_STD_CHRONO)

hpx_check_for_cxx11_std_cstdint(
DEFINITIONS HPX_HAVE_CXX11_STD_CSTDINT)

hpx_check_for_cxx11_std_initializer_list(
DEFINITIONS HPX_HAVE_CXX11_STD_INITIALIZER_LIST)

Expand Down Expand Up @@ -819,6 +828,13 @@ hpx_check_for_cxx14_std_integer_sequence(
hpx_check_for_cxx14_std_result_of_sfinae(
DEFINITIONS HPX_HAVE_CXX14_STD_RESULT_OF_SFINAE)

################################################################################
# Check for misc system headers
################################################################################

hpx_check_for_unistd_h(
DEFINITIONS HPX_HAVE_UNISTD_H)

if(NOT WIN32)
##############################################################################
# Macro definitions for system headers
Expand Down
28 changes: 28 additions & 0 deletions cmake/HPX_AddConfigTest.cmake
Expand Up @@ -113,6 +113,13 @@ macro(hpx_cpuid target variable)
FILE EXECUTE ARGS "${target}" ${ARGN})
endmacro()

###############################################################################
macro(hpx_check_for_unistd_h)
add_hpx_config_test(HPX_WITH_UNISTD_H
SOURCE cmake/tests/unistd_h.cpp
FILE ${ARGN})
endmacro()

###############################################################################
macro(hpx_check_for_cxx11_alias_templates)
add_hpx_config_test(HPX_WITH_CXX11_ALIAS_TEMPLATES
Expand Down Expand Up @@ -148,6 +155,13 @@ macro(hpx_check_for_cxx11_decltype_n3276)
FILE ${ARGN})
endmacro()

###############################################################################
macro(hpx_check_for_cxx11_sfinae_expression)
add_hpx_config_test(HPX_WITH_CXX11_SFINAE_EXPRESSION
SOURCE cmake/tests/cxx11_sfinae_expression.cpp
FILE ${ARGN})
endmacro()

###############################################################################
macro(hpx_check_for_cxx11_defaulted_functions)
add_hpx_config_test(HPX_WITH_CXX11_DEFAULTED_FUNCTIONS
Expand Down Expand Up @@ -260,6 +274,13 @@ macro(hpx_check_for_cxx11_std_chrono)
FILE ${ARGN})
endmacro()

###############################################################################
macro(hpx_check_for_cxx11_std_cstdint)
add_hpx_config_test(HPX_WITH_CXX11_CSTDINT
SOURCE cmake/tests/cxx11_std_cstdint.cpp
FILE ${ARGN})
endmacro()

###############################################################################
macro(hpx_check_for_cxx11_std_is_bind_expression)
add_hpx_config_test(HPX_WITH_CXX11_IS_BIND_EXPRESSION
Expand Down Expand Up @@ -302,6 +323,13 @@ macro(hpx_check_for_cxx11_std_initializer_list)
FILE ${ARGN})
endmacro()

###############################################################################
macro(hpx_check_for_cxx11_std_array)
add_hpx_config_test(HPX_WITH_CXX11_ARRAY
SOURCE cmake/tests/cxx11_std_array.cpp
FILE ${ARGN})
endmacro()

###############################################################################
macro(hpx_check_for_cxx11_std_type_traits)
add_hpx_config_test(HPX_WITH_CXX11_TYPE_TRAITS
Expand Down
4 changes: 0 additions & 4 deletions cmake/templates/config_defines.hpp.in
Expand Up @@ -8,10 +8,6 @@
#if !defined(HPX_CONFIG_DEFINES_HPP)
#define HPX_CONFIG_DEFINES_HPP

#if defined(__INTEL_COMPILER) && !defined(BOOST_COMPILER_CONFIG)
#define BOOST_COMPILER_CONFIG "hpx/config/boost/compiler/intel.hpp"
#endif

#if !defined(HPX_PREFIX)
#define HPX_PREFIX "@HPX_DEFINES_PREFIX@"
#endif
Expand Down
25 changes: 25 additions & 0 deletions cmake/tests/cxx11_sfinae_expression.cpp
@@ -0,0 +1,25 @@
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2015 Thomas Heller
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
////////////////////////////////////////////////////////////////////////////////

#include <utility>

struct test_class1 { void foo() {} };
struct test_class2 { void bar() {} };

template <typename T>
decltype(std::declval<T>().foo()) foo()
{}

template <typename T>
decltype(std::declval<T>().bar()) foo()
{}

int main()
{
foo<test_class1>();
foo<test_class2>();
}
14 changes: 14 additions & 0 deletions cmake/tests/cxx11_std_array.cpp
@@ -0,0 +1,14 @@
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2001 John Maddock
// Copyright (c) 2011 Bryce Lelbach
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
////////////////////////////////////////////////////////////////////////////////

#include <array>

int main()
{
std::array<int, 10> arr;
}
19 changes: 19 additions & 0 deletions cmake/tests/cxx11_std_cstdint.cpp
@@ -0,0 +1,19 @@
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2015 Thomas Heller
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
////////////////////////////////////////////////////////////////////////////////

#include <cstdint>

int main()
{
std::int16_t i1;
std::int32_t i2;
std::int64_t i3;

std::uint16_t ui1;
std::uint32_t ui2;
std::uint64_t ui3;
}
11 changes: 11 additions & 0 deletions cmake/tests/unistd_h.cpp
@@ -0,0 +1,11 @@
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2015 Thomas Heller
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
////////////////////////////////////////////////////////////////////////////////

#include <unistd.h>

int main()
{}
8 changes: 4 additions & 4 deletions examples/heartbeat/heartbeat.cpp
Expand Up @@ -21,7 +21,7 @@
#include <boost/cstdint.hpp>

// include Windows specific performance counter binding
#if defined(BOOST_WINDOWS) && HPX_USE_WINDOWS_PERFORMANCE_COUNTERS != 0
#if defined(HPX_WINDOWS) && HPX_USE_WINDOWS_PERFORMANCE_COUNTERS != 0
#include "win_perf_counters.hpp"
#endif

Expand All @@ -34,7 +34,7 @@ void stop_monitor(boost::shared_ptr<hpx::promise<void> > p)
///////////////////////////////////////////////////////////////////////////////
int monitor(double runfor, std::string const& name, boost::uint64_t pause)
{
#if defined(BOOST_WINDOWS) && HPX_USE_WINDOWS_PERFORMANCE_COUNTERS != 0
#if defined(HPX_WINDOWS) && HPX_USE_WINDOWS_PERFORMANCE_COUNTERS != 0
hpx::register_shutdown_function(&uninstall_windows_counters);
#endif

Expand Down Expand Up @@ -88,7 +88,7 @@ int monitor(double runfor, std::string const& name, boost::uint64_t pause)
% double((value.time_ - zero_time) * 1e-9)
% value.value_);

#if defined(BOOST_WINDOWS) && HPX_USE_WINDOWS_PERFORMANCE_COUNTERS != 0
#if defined(HPX_WINDOWS) && HPX_USE_WINDOWS_PERFORMANCE_COUNTERS != 0
update_windows_counters(value.value_);
#endif
}
Expand Down Expand Up @@ -132,7 +132,7 @@ int main(int argc, char* argv[])
, "time to wait before this application exits ([s], default: run forever)")
;

#if defined(BOOST_WINDOWS) && HPX_USE_WINDOWS_PERFORMANCE_COUNTERS != 0
#if defined(HPX_WINDOWS) && HPX_USE_WINDOWS_PERFORMANCE_COUNTERS != 0
hpx::register_startup_function(&install_windows_counters);
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/heartbeat/win_perf_counters.cpp
Expand Up @@ -7,7 +7,7 @@

///////////////////////////////////////////////////////////////////////////////
// This is code specific to Windows
#if defined(BOOST_WINDOWS)
#if defined(HPX_WINDOWS)

#include <windows.h>
#include <perflib.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/heartbeat/win_perf_counters.hpp
Expand Up @@ -10,7 +10,7 @@

///////////////////////////////////////////////////////////////////////////////
// This is code specific to Windows
#if defined(BOOST_WINDOWS)
#if defined(HPX_WINDOWS)

///////////////////////////////////////////////////////////////////////////////
// Install the windows performance counters exposing the HPX counters.
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/EasyBMP/EasyBMP.h
Expand Up @@ -18,7 +18,7 @@
* *
*************************************************/

#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
#if defined(HPX_MSVC) && !defined(_CRT_SECURE_NO_DEPRECATE)
// MS Visual Studio gives warnings when using
// fopen. But fopen_s is not going to work well
// with most compilers, and fopen_s uses different
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/fibonacci_await.cpp
Expand Up @@ -22,7 +22,7 @@
boost::uint64_t threshold = 2;

///////////////////////////////////////////////////////////////////////////////
BOOST_NOINLINE boost::uint64_t fibonacci_serial(boost::uint64_t n)
HPX_NOINLINE boost::uint64_t fibonacci_serial(boost::uint64_t n)
{
if (n < 2)
return n;
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/fibonacci_dataflow.cpp
Expand Up @@ -25,7 +25,7 @@
boost::uint64_t threshold = 2;

///////////////////////////////////////////////////////////////////////////////
BOOST_NOINLINE boost::uint64_t fibonacci_serial(boost::uint64_t n)
HPX_NOINLINE boost::uint64_t fibonacci_serial(boost::uint64_t n)
{
if (n < 2)
return n;
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/fibonacci_futures.cpp
Expand Up @@ -20,7 +20,7 @@
boost::uint64_t threshold = 2;

///////////////////////////////////////////////////////////////////////////////
BOOST_NOINLINE boost::uint64_t fibonacci_serial(boost::uint64_t n)
HPX_NOINLINE boost::uint64_t fibonacci_serial(boost::uint64_t n)
{
if (n < 2)
return n;
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/fibonacci_futures_distributed.cpp
Expand Up @@ -50,7 +50,7 @@ struct when_all_wrapper
};

///////////////////////////////////////////////////////////////////////////////
BOOST_NOINLINE boost::uint64_t fibonacci_serial_sub(boost::uint64_t n)
HPX_NOINLINE boost::uint64_t fibonacci_serial_sub(boost::uint64_t n)
{
if (n < 2)
return n;
Expand Down
4 changes: 0 additions & 4 deletions examples/quickstart/interest_calculator.cpp
Expand Up @@ -15,10 +15,6 @@
// $134.01 and will have made $34.01 in interest.
///////////////////////////////////////////////////////////////////////////////

// When using the dataflow component we have to define the following constant
// as this example uses up to 6 arguments for one of its components.
#define HPX_LIMIT 6

#include <hpx/hpx.hpp>
#include <hpx/hpx_init.hpp>
#include <hpx/runtime/actions/plain_action.hpp>
Expand Down
4 changes: 2 additions & 2 deletions examples/quickstart/zerocopy_rdma.cpp
Expand Up @@ -28,12 +28,12 @@ class pointer_allocator
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;

pointer_allocator() BOOST_NOEXCEPT
pointer_allocator() HPX_NOEXCEPT
: pointer_(0), size_(0)
{
}

pointer_allocator(pointer p, size_type size) BOOST_NOEXCEPT
pointer_allocator(pointer p, size_type size) HPX_NOEXCEPT
: pointer_(p), size_(size)
{
}
Expand Down
2 changes: 1 addition & 1 deletion examples/sheneos/fname.h
Expand Up @@ -14,7 +14,7 @@
#define FNAME(n_) n_##_
#elif defined(__PGI)
#define FNAME(n_) n_##_
#elif defined(_MSC_VER)
#elif defined(HPX_MSVC)
#define FNAME(n_) n_
#else
#error "Unknown Fortran name mangling convention"
Expand Down
10 changes: 5 additions & 5 deletions hpx/apply.hpp
Expand Up @@ -35,7 +35,7 @@ namespace hpx { namespace detail
struct apply_dispatch
{
template <typename F, typename ...Ts>
BOOST_FORCEINLINE static
HPX_FORCEINLINE static
typename boost::enable_if_c<
traits::detail::is_deferred_callable<F(Ts&&...)>::value,
bool
Expand All @@ -57,7 +57,7 @@ namespace hpx { namespace detail
>::type>
{
template <typename F, typename ...Ts>
BOOST_FORCEINLINE static
HPX_FORCEINLINE static
typename boost::enable_if_c<
traits::detail::is_deferred_callable<F(Ts&&...)>::value,
bool
Expand All @@ -79,7 +79,7 @@ namespace hpx { namespace detail
>::type>
{
template <typename F, typename ...Ts>
BOOST_FORCEINLINE static
HPX_FORCEINLINE static
typename boost::enable_if_c<
traits::detail::is_deferred_callable<F(Ts&&...)>::value,
bool
Expand All @@ -100,7 +100,7 @@ namespace hpx { namespace detail
>::type>
{
template <typename Action, typename BoundArgs, typename ...Ts>
BOOST_FORCEINLINE static bool
HPX_FORCEINLINE static bool
call(hpx::util::detail::bound_action<Action, BoundArgs> const& bound,
Ts&&... ts)
{
Expand All @@ -112,7 +112,7 @@ namespace hpx { namespace detail
namespace hpx
{
template <typename F, typename ...Ts>
BOOST_FORCEINLINE bool apply(F&& f, Ts&&... ts)
HPX_FORCEINLINE bool apply(F&& f, Ts&&... ts)
{
return detail::apply_dispatch<typename util::decay<F>::type>::call(
std::forward<F>(f), std::forward<Ts>(ts)...);
Expand Down

0 comments on commit 5b4e47d

Please sign in to comment.