Skip to content

Commit 4f35701

Browse files
author
Marcin Godzina
committed
[#3393] add fedora 40 to hammer
1 parent b500325 commit 4f35701

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hammer.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
'37': False,
6464
'38': True,
6565
'39': True,
66+
'40': True,
6667
},
6768
'centos': {
6869
'7': False,
@@ -1199,6 +1200,10 @@ def _install_libyang_cpp_from_sources(ignore_errors = False):
11991200
try:
12001201
execute('git clone https://github.com/CESNET/libyang-cpp.git ~/.hammer-tmp/libyang-cpp')
12011202
execute(f'git checkout {version}', cwd='~/.hammer-tmp/libyang-cpp')
1203+
# New cpp compiler is more picky about missing headers. (ex. Fedora 40)
1204+
return_code = execute('sudo grep "#include <algorithm>" ~/.hammer-tmp/libyang-cpp/src/Context.cpp', raise_error=False)
1205+
if return_code == 1:
1206+
execute('sed -i "/#include <libyang\/libyang.h>/a #include <algorithm>" ~/.hammer-tmp/libyang-cpp/src/Context.cpp')
12021207
execute('mkdir ~/.hammer-tmp/libyang-cpp/build')
12031208
execute('cmake -DBUILD_TESTING=OFF .. ', cwd='~/.hammer-tmp/libyang-cpp/build')
12041209
execute('make -j $(nproc || gnproc || echo 1)', cwd='~/.hammer-tmp/libyang-cpp/build')

0 commit comments

Comments
 (0)