Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorPhil Nash2014-02-11 18:11:37 +0000
committerPhil Nash2014-02-11 18:11:37 +0000
commitd29cbecfa5c5e535dad5d91e2a0b5f1c810bc0d8 (patch)
tree5a637a1c3b1291aafd8acd41486aae71eb9b3b50 /scripts
parent5845ae94aad65cbbde26b87a49b81dba411e84a7 (diff)
downloadcatch3-d29cbecfa5c5e535dad5d91e2a0b5f1c810bc0d8.tar.gz
Updated single include generator to allow for embedded micro-libraries
Diffstat (limited to 'scripts')
-rw-r--r--scripts/generateSingleHeader.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/generateSingleHeader.py b/scripts/generateSingleHeader.py
index 839c72cc..b1f9ae88 100644
--- a/scripts/generateSingleHeader.py
+++ b/scripts/generateSingleHeader.py
@@ -8,10 +8,10 @@ from scriptCommon import catchPath
versionParser = re.compile( r'(\s*Version\slibraryVersion)\s*\(\s*(.*)\s*,\s*(.*)\s*,\s*(.*)\s*,\s*\"(.*)\"\s*\).*' )
includesParser = re.compile( r'\s*#include\s*"(.*)"' )
-guardParser = re.compile( r'\s*#.*_INCLUDED')
+guardParser = re.compile( r'\s*#.*TWOBLUECUBES_CATCH_.*_INCLUDED')
defineParser = re.compile( r'\s*#define')
-ifParser = re.compile( r'\s*#if')
-endIfParser = re.compile( r'\s*#endif')
+ifParser = re.compile( r'\s*#ifndef TWOBLUECUBES_CATCH_.*_INCLUDED')
+endIfParser = re.compile( r'\s*#endif // TWOBLUECUBES_CATCH_.*_INCLUDED')
ifImplParser = re.compile( r'\s*#if.*(CATCH_CONFIG_MAIN|CATCH_CONFIG_RUNNER)')
commentParser1 = re.compile( r'^\s*/\*')
commentParser2 = re.compile( r'^\s*\*')
@@ -62,7 +62,8 @@ def parseFile( path, filename ):
header = m.group(1)
headerPath, sep, headerFile = header.rpartition( "/" )
if not headerFile in seenHeaders:
- seenHeaders.add( headerFile )
+ if headerFile != "tbc_text_format.h" and headerFile != "clara.h":
+ seenHeaders.add( headerFile )
write( "// #included from: {0}\n".format( header ) )
if( headerPath == "internal" and path.endswith( "internal/" ) ):
headerPath = ""