Skip to content

Commit

Permalink
Merge pull request STEllAR-GROUP#1735 from STEllAR-GROUP/config-includes
Browse files Browse the repository at this point in the history
Config includes
  • Loading branch information
hkaiser committed Aug 29, 2015
2 parents 01a8ff0 + d2133e1 commit 2d5c62b
Show file tree
Hide file tree
Showing 41 changed files with 280 additions and 473 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Expand Up @@ -688,6 +688,9 @@ hpx_check_for_cxx11_explicit_cvt_ops(
hpx_check_for_cxx11_function_template_default_args(
REQUIRED "HPX needs support for C++11 defaulted function template arguments")

hpx_check_for_cxx11_initializer_list(
DEFINITIONS HPX_HAVE_CXX11_INITIALIZER_LIST)

hpx_check_for_cxx11_inline_namespaces(
DEFINITIONS HPX_HAVE_CXX11_INLINE_NAMESPACES)

Expand Down Expand Up @@ -728,12 +731,18 @@ hpx_check_for_cxx11_std_chrono(
hpx_check_for_cxx11_std_initializer_list(
DEFINITIONS HPX_HAVE_CXX11_STD_INITIALIZER_LIST)

hpx_check_for_cxx11_std_is_bind_expression(
DEFINITIONS HPX_HAVE_CXX11_STD_IS_BIND_EXPRESSION)

hpx_check_for_cxx11_std_is_final(
DEFINITIONS HPX_HAVE_CXX11_STD_IS_FINAL)

hpx_check_for_cxx11_std_is_null_pointer(
DEFINITIONS HPX_HAVE_CXX11_STD_IS_NULL_POINTER)

hpx_check_for_cxx11_std_is_placeholder(
DEFINITIONS HPX_HAVE_CXX11_STD_IS_PLACEHOLDER)

hpx_check_for_cxx11_std_unique_ptr(
REQUIRED "HPX needs support for C++11 std::unique_ptr")

Expand Down
21 changes: 21 additions & 0 deletions cmake/HPX_AddConfigTest.cmake
Expand Up @@ -176,6 +176,13 @@ macro(hpx_check_for_cxx11_function_template_default_args)
FILE ${ARGN})
endmacro()

###############################################################################
macro(hpx_check_for_cxx11_initializer_list)
add_hpx_config_test(HPX_WITH_CXX11_INITIALIZER_LIST
SOURCE cmake/tests/cxx11_initializer_list.cpp
FILE ${ARGN})
endmacro()

###############################################################################
macro(hpx_check_for_cxx11_inline_namespaces)
add_hpx_config_test(HPX_WITH_CXX11_INLINE_NAMESPACES
Expand Down Expand Up @@ -253,6 +260,13 @@ macro(hpx_check_for_cxx11_std_chrono)
FILE ${ARGN})
endmacro()

###############################################################################
macro(hpx_check_for_cxx11_std_is_bind_expression)
add_hpx_config_test(HPX_WITH_CXX11_IS_BIND_EXPRESSION
SOURCE cmake/tests/cxx11_std_is_bind_expression.cpp
FILE ${ARGN})
endmacro()

###############################################################################
macro(hpx_check_for_cxx11_std_is_final)
add_hpx_config_test(HPX_WITH_CXX11_IS_FINAL
Expand All @@ -267,6 +281,13 @@ macro(hpx_check_for_cxx11_std_is_null_pointer)
FILE ${ARGN})
endmacro()

###############################################################################
macro(hpx_check_for_cxx11_std_is_placeholder)
add_hpx_config_test(HPX_WITH_CXX11_IS_PLACEHOLDER
SOURCE cmake/tests/cxx11_std_is_placeholder.cpp
FILE ${ARGN})
endmacro()

###############################################################################
macro(hpx_check_for_cxx11_std_initializer_list)
add_hpx_config_test(HPX_WITH_CXX11_STD_INITIALIZER_LIST
Expand Down
24 changes: 24 additions & 0 deletions cmake/tests/cxx11_initializer_list.cpp
@@ -0,0 +1,24 @@
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2008 Beman Dawes
// Copyright (c) 2015 Agustin Berge
//
// 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)
////////////////////////////////////////////////////////////////////////////////

void test_aggregate_initializer_list() {
int ail[] = {1, 2, 3};
}

struct ctor {
ctor(std::initializer_list<int>) {}
};

void test_ctor_initializer_list() {
ctor cil{1, 2, 3};
}

int main() {
test_aggregate_initializer_list();
test_ctor_initializer_list();
}
13 changes: 13 additions & 0 deletions cmake/tests/cxx11_std_is_bind_expression.cpp
@@ -0,0 +1,13 @@
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2015 Agustin Berge
//
// 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 <functional>

int main()
{
int check_is_bind_expression[!std::is_bind_expression<int>::value ? 1 : -1];
}
14 changes: 14 additions & 0 deletions cmake/tests/cxx11_std_is_placeholder.cpp
@@ -0,0 +1,14 @@
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2015 Agustin Berge
//
// 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 <functional>

int main()
{
using namespace std::placeholders;
int check_is_placeholder[std::is_placeholder<int>::value == 0 ? 1 : -1];
}
4 changes: 2 additions & 2 deletions docs/release_procedure.rst
Expand Up @@ -66,7 +66,7 @@ Note: If you are using commandline git to change branches use:
#. Checkout the main branch, and bump the HPX version to the next release
target. The following files contain version info:

* ``hpx/version.hpp``
* ``hpx/config/version.hpp``
* ``docs/hpx.qbk``
* ``CMakeLists.txt``
* Grep for old version number
Expand All @@ -76,7 +76,7 @@ Note: If you are using commandline git to change branches use:
lines 262/263.

#. Checkout the release branch, and remove the ``-trunk`` tag from
``hpx/version.hpp`` (replace it with ``-rc1`` for the release candidate
``hpx/config/version.hpp`` (replace it with ``-rc1`` for the release
and later with an empty string for the actual release).

#. Change logo for release documentation by removing '_draft' suffix
Expand Down
8 changes: 3 additions & 5 deletions hpx/config.hpp
Expand Up @@ -15,13 +15,14 @@
#endif

#include <hpx/config/defines.hpp>
#include <hpx/version.hpp>
#include <hpx/config/version.hpp>
#include <hpx/config/compiler_specific.hpp>
#include <hpx/config/branch_hints.hpp>
#include <hpx/config/manual_profiling.hpp>
#include <hpx/config/forceinline.hpp>
#include <hpx/config/constexpr.hpp>
#include <hpx/config/cxx11_macros.hpp>

#include <boost/version.hpp>

#if BOOST_VERSION < 105600
#include <boost/exception/detail/attribute_noreturn.hpp>
Expand Down Expand Up @@ -534,7 +535,4 @@
# endif
#endif

///////////////////////////////////////////////////////////////////////////////
#include <hpx/config/defaults.hpp>

#endif

0 comments on commit 2d5c62b

Please sign in to comment.