diff options
| author | Martin Hořeňovský | 2019-12-06 11:53:31 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2019-12-06 11:53:31 +0100 |
| commit | 91ee07e08c5a72536834960ecf2527fa90244046 (patch) | |
| tree | ee7bf0251c746a50e6e871cf00ea52baf9ed44ec /tools/scripts/embedClara.py | |
| parent | 6eb04667ad4f571f20b040c5e7a4e0c25e99787c (diff) | |
| download | catch3-91ee07e08c5a72536834960ecf2527fa90244046.tar.gz | |
Moved scripts/ to tools/scripts/
Diffstat (limited to 'tools/scripts/embedClara.py')
| -rwxr-xr-x | tools/scripts/embedClara.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/scripts/embedClara.py b/tools/scripts/embedClara.py new file mode 100755 index 00000000..7ceb3e32 --- /dev/null +++ b/tools/scripts/embedClara.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +# Execute this script any time you import a new copy of Clara into the third_party area +import os +import sys +import embed + +rootPath = os.path.dirname(os.path.realpath( os.path.dirname(sys.argv[0]))) + +filename = os.path.join( rootPath, "third_party", "clara.hpp" ) +outfilename = os.path.join( rootPath, "include", "external", "clara.hpp" ) + + +# Mapping of pre-processor identifiers +idMap = { + "CLARA_HPP_INCLUDED": "CATCH_CLARA_HPP_INCLUDED", + "CLARA_CONFIG_CONSOLE_WIDTH": "CATCH_CLARA_CONFIG_CONSOLE_WIDTH", + "CLARA_TEXTFLOW_HPP_INCLUDED": "CATCH_CLARA_TEXTFLOW_HPP_INCLUDED", + "CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH": "CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH", + "CLARA_PLATFORM_WINDOWS": "CATCH_PLATFORM_WINDOWS" + } + +# outer namespace to add +outerNamespace = { "clara": ("Catch", "clara") } + +mapper = embed.LineMapper( idMap, outerNamespace ) +mapper.mapFile( filename, outfilename )
\ No newline at end of file |