File tree Expand file tree Collapse file tree 2 files changed +32
-3
lines changed
Expand file tree Collapse file tree 2 files changed +32
-3
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,6 @@ build-requires = [
128128host-requires = [
129129 " virtual:interface/blas" ,
130130 " virtual:compiler/fortran" ,
131- " pkg:generic/boost" ,
132131 " pkg:generic/brial" ,
133132 " pkg:generic/cddlib" ,
134133 " pkg:generic/cliquer" ,
@@ -182,6 +181,7 @@ dependencies = [
182181
183182[external .optional-host-requires ]
184183extra = [
184+ " pkg:generic/boost" ,
185185 " pkg:generic/bliss" ,
186186 " pkg:generic/coxeter3" ,
187187 " pkg:generic/mcqd" ,
Original file line number Diff line number Diff line change 1+ boost_cpp17_compatible = false
2+ boost = dependency (
3+ ' boost' ,
4+ version : ' >=1.83.0' ,
5+ required : false ,
6+ modules : [' graph' , ' tuple' ],
7+ )
8+ if boost.found()
9+ # Need at least v1.83.0 (https://github.com/boostorg/functional/commit/6a573e4b8333ee63ee62ce95558c3667348db233)
10+ # for C++17 compatibility.
11+ boost_cpp17_compatible = true
12+ else
13+ boost = dependency (
14+ ' boost' ,
15+ version : ' >=1.66.0' ,
16+ required : false ,
17+ modules : [' graph' , ' tuple' ],
18+ )
19+ endif
20+
121py.install_sources(
222 ' __init__.py' ,
323 ' all.py' ,
@@ -39,14 +59,23 @@ extension_data_cpp = {
3959}
4060
4161foreach name, pyx : extension_data_cpp
62+ deps = [py_dep, cysignals, gmp]
63+ override_options = [' cython_language=cpp' ]
64+ if name == ' boost_graph'
65+ deps += [boost]
66+ if not boost_cpp17_compatible
67+ override_options += [' cpp_std=c++11' ]
68+ endif
69+ endif
70+
4271 py.extension_module(
4372 name,
4473 sources : pyx,
4574 subdir : ' sage/graphs/base' ,
4675 install : true ,
47- override_options : [ ' cython_language=cpp ' ] ,
76+ override_options : override_options ,
4877 include_directories : [inc_cpython, inc_data_structures, inc_rings],
49- dependencies : [py_dep, cysignals, gmp] ,
78+ dependencies : deps ,
5079 )
5180endforeach
5281
You can’t perform that action at this time.
0 commit comments