Commit ad511e1d authored by Matthias Redies's avatar Matthias Redies

now it know about comments

parent 1e449d0e
......@@ -8,12 +8,20 @@ files.extend(glob("**/*.F90"))
cmake_files = glob("**/CMakeLists.txt")
def rm_comments(line):
comm_pos = line.find("#")
if comm_pos == -1:
return line
else:
return line[:comm_pos]
def in_cmake(cmake_files, file):
for cmf in cmake_files:
with open(cmf) as f:
lines = f.readlines()
for l in lines:
if file in l:
if file in rm_comments(l):
return True
return False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment