Skip to content

Commit

Permalink
Use c++17 if available
Browse files Browse the repository at this point in the history
  • Loading branch information
mhuen committed Dec 10, 2024
1 parent 9f0b620 commit 754c1d9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ def get_boost_libraries():
# python 3 libraries
suffix = '{}{}'.format(sys.version_info.major, sys.version_info.minor)
libraries = [
'boost_python'+suffix, 'boost_numpy'+suffix, 'phys-services',
'boost_python'+suffix, 'boost_numpy'+suffix, 'phys-services', 'dataclasses', 'icetray',
]
else:
# python 2 libraries
libraries = ['boost_python', 'phys-services']
libraries = ['boost_python', 'phys-services', 'dataclasses', 'icetray']
return libraries


Expand Down Expand Up @@ -155,9 +155,11 @@ def has_flag(compiler, flagname):

def cpp_flag(compiler):
"""Return the -std=c++[11/14] compiler flag.
The c++14 is prefered over c++11 (when it is available).
The c++17 is prefered over c++14 or c++11 (when it is available).
"""
if has_flag(compiler, '-std=c++14'):
if has_flag(compiler, '-std=c++17'):
return '-std=c++17'
elif has_flag(compiler, '-std=c++14'):
return '-std=c++14'
elif has_flag(compiler, '-std=c++11'):
return '-std=c++11'
Expand Down

0 comments on commit 754c1d9

Please sign in to comment.