Skip to content

Commit

Permalink
Merge branch 'compile-warnings' into 'master'
Browse files Browse the repository at this point in the history
Compile warnings

Closes #25, #20, and #21

See merge request !9
  • Loading branch information
oostenbrink committed Jan 25, 2018
2 parents f33eb4b + 04106d7 commit e40f9cf
Show file tree
Hide file tree
Showing 136 changed files with 11,495 additions and 10,790 deletions.
1 change: 1 addition & 0 deletions gromosXX/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ build:

doc: doc/doxygen.conf.in
sed "s/<SRCDIR>/$(top_srcdir)/g" $(top_srcdir)/doc/doxygen.conf.in > doxygen.conf
python $(top_srcdir)/doc/generate_snippets.py $(top_srcdir)/src/io/parameter/in_parameter.cc $(top_srcdir)/src/io/topology/in_distanceres.cc > $(top_srcdir)/doc/snippets/snippets.cc
mkdir -p doc
doxygen doxygen.conf

Expand Down
25 changes: 25 additions & 0 deletions gromosXX/doc/generate_snippets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#! /usr/bin/env python
# get lines containing the documentation example of a gromos block between 'INFO <<"' and '..\n";'
# and output them as snippets that can be referred to in doxygen comments using @snippet

import sys, os

if len(sys.argv) < 2:
sys.exit("USAGE: " + sys.argv[0] + " <filenames")

for f in sys.argv[1:]:
with open(f, "r") as fi:
snipping=0
for line in fi:
if snipping==0:
if line.strip().replace(" ", "").replace("\t","").startswith('exampleblock<<"'):
snipping=1
blockname=line.split('"')[-2].split("\\n")[0]
print("//! ["+blockname+"]")
print(blockname)
elif snipping==1:
print(line.split('"')[-2].split("\\n")[0]+" ")
if line.strip().replace(" ", "").replace("\t","").startswith('exampleblock<<"END'):
print("//! ["+blockname+"]\n")
snipping=0

Loading

0 comments on commit e40f9cf

Please sign in to comment.