mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Help: Fix some erroneous code block markers in Module docs.
There are many style errors in these files. This patch fixes only
the syntactical errors.
The script which ported these to rst tripped on some incorrectly
formatted blocks in the original input documentation. Use a new
script to find problematic code (and then fix them manually):
#!/usr/bin/env python
import os
rootDir = '.'
def checkFile(fname):
f = open(fname)
lines = f.readlines()
started = False
counter = 0
for l in lines:
if "#" in l:
started = True
elif started:
return
lin = l.find("(")
if lin != -1 and l.find(")", lin) == -1 and \
not "(To distribute this file outside of CMake, substitute the full" in l:
for lp in lines[counter+1:]:
if lp == "# ::\n":
print "\n\n######### " + fname + "\n\n"
print ''.join(lines[max(counter-2, 0):counter+6])
break
elif lp == "#\n" :
continue
break
counter += 1
for dirName, subdirList, fileList in os.walk(rootDir):
for fname in fileList:
checkFile(os.path.join(dirName, fname))
This commit is contained in:
@@ -22,11 +22,9 @@
|
||||
# swig generated module (swig -outdir option) The name-specific variable
|
||||
# SWIG_MODULE_<name>_EXTRA_DEPS may be used to specify extra
|
||||
# dependencies for the generated modules. If the source file generated
|
||||
# by swig need some special flag you can use
|
||||
# set_source_files_properties( ${swig_generated_file_fullname}
|
||||
#
|
||||
# ::
|
||||
# by swig need some special flag you can use::
|
||||
#
|
||||
# set_source_files_properties( ${swig_generated_file_fullname}
|
||||
# PROPERTIES COMPILE_FLAGS "-bla")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user