Skip to content

Commit a526242

Browse files
committed
Check whether Boost.Graph supports the current compiler.
Recent change to Boost.Math, on which Boost.Graph depends, made it incompatible with MSVC 14.0. Rather than check for a specific compiler version, add a configure-time check whether Boost.Graph compiles (or at least the part that is used in Boost.Parameter tests). Disable the tests that depend on Boost.Graph if that check fails. Refs boostorg/math#1275.
1 parent c86e3e4 commit a526242

3 files changed

Lines changed: 30 additions & 1 deletion

File tree

config/Jamfile.v2

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright Andrey Semashev 2025.
2+
#
3+
# Distributed under the Boost Software License, Version 1.0.
4+
# (See accompanying file LICENSE_1_0.txt or copy at
5+
# http://www.boost.org/LICENSE_1_0.txt)
6+
7+
exe graph_supported : graph_supported.cpp : <library>/boost/graph//boost_graph ;
8+
explicit graph_supported ;

config/graph_supported.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright Andrey Semashev 2025.
3+
* Distributed under the Boost Software License, Version 1.0.
4+
* (See accompanying file LICENSE_1_0.txt or copy at
5+
* http://www.boost.org/LICENSE_1_0.txt)
6+
*/
7+
8+
// This test checks whether the portion of Boost.Graph that is used by Boost.Parameter tests
9+
// is compatible with the current compiler. The headers listed below are used in Boost.Parameter tests.
10+
11+
#include <boost/graph/graph_traits.hpp>
12+
#include <boost/graph/properties.hpp>
13+
#include <boost/graph/depth_first_search.hpp>
14+
#include <boost/graph/adjacency_list.hpp>
15+
16+
int main()
17+
{
18+
}

test/Jamfile.v2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Copyright David Abrahams, Daniel Wallin 2006.
22
# Copyright Cromwell D. Enage 2017.
3+
# Copyright Andrey Semashev 2025.
4+
#
35
# Distributed under the Boost Software License, Version 1.0.
46
# (See accompanying file LICENSE_1_0.txt or copy at
57
# http://www.boost.org/LICENSE_1_0.txt)
@@ -425,9 +427,10 @@ alias parameter_literate_tests
425427
:
426428
:
427429
:
430+
[ check-target-builds ../config//graph_supported "Boost.Graph compiles" : <library>/boost/graph//boost_graph : <build>no ]
431+
428432
<define>BOOST_PARAMETER_MAX_ARITY=5
429433
<define>BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY=6
430-
<library>/boost/graph//boost_graph
431434
:
432435
:
433436
<preserve-target-tests>off

0 commit comments

Comments
 (0)