aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/fuse_gtest_files.py
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-09-14 05:35:59 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-09-14 05:35:59 +0000
commitdac3e879c56a50696a36f53e1e5e353e48fa665f (patch)
tree153342e638fc52dae7800c9de65ab4576cf52b26 /scripts/fuse_gtest_files.py
parent88e0df62470fa82e8d3010ef88241cd7565ebe9e (diff)
downloadgoogletest-dac3e879c56a50696a36f53e1e5e353e48fa665f.tar.gz
googletest-dac3e879c56a50696a36f53e1e5e353e48fa665f.tar.bz2
googletest-dac3e879c56a50696a36f53e1e5e353e48fa665f.zip
Include gtest headers as user headers instead of system headers.
Diffstat (limited to 'scripts/fuse_gtest_files.py')
-rwxr-xr-xscripts/fuse_gtest_files.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/fuse_gtest_files.py b/scripts/fuse_gtest_files.py
index 148444ca..57ef72f0 100755
--- a/scripts/fuse_gtest_files.py
+++ b/scripts/fuse_gtest_files.py
@@ -67,8 +67,8 @@ import sys
# Test root directory.
DEFAULT_GTEST_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..')
-# Regex for matching '#include <gtest/...>'.
-INCLUDE_GTEST_FILE_REGEX = re.compile(r'^\s*#\s*include\s*<(gtest/.+)>')
+# Regex for matching '#include "gtest/..."'.
+INCLUDE_GTEST_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(gtest/.+)"')
# Regex for matching '#include "src/..."'.
INCLUDE_SRC_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(src/.+)"')
@@ -162,7 +162,7 @@ def FuseGTestH(gtest_root, output_dir):
for line in file(os.path.join(gtest_root, gtest_header_path), 'r'):
m = INCLUDE_GTEST_FILE_REGEX.match(line)
if m:
- # It's '#include <gtest/...>' - let's process it recursively.
+ # It's '#include "gtest/..."' - let's process it recursively.
ProcessFile('include/' + m.group(1))
else:
# Otherwise we copy the line unchanged to the output file.
@@ -191,19 +191,19 @@ def FuseGTestAllCcToFile(gtest_root, output_file):
m = INCLUDE_GTEST_FILE_REGEX.match(line)
if m:
if 'include/' + m.group(1) == GTEST_SPI_H_SEED:
- # It's '#include <gtest/gtest-spi.h>'. This file is not
- # #included by <gtest/gtest.h>, so we need to process it.
+ # It's '#include "gtest/gtest-spi.h"'. This file is not
+ # #included by "gtest/gtest.h", so we need to process it.
ProcessFile(GTEST_SPI_H_SEED)
else:
- # It's '#include <gtest/foo.h>' where foo is not gtest-spi.
- # We treat it as '#include <gtest/gtest.h>', as all other
+ # It's '#include "gtest/foo.h"' where foo is not gtest-spi.
+ # We treat it as '#include "gtest/gtest.h"', as all other
# gtest headers are being fused into gtest.h and cannot be
# #included directly.
- # There is no need to #include <gtest/gtest.h> more than once.
+ # There is no need to #include "gtest/gtest.h" more than once.
if not GTEST_H_SEED in processed_files:
processed_files.add(GTEST_H_SEED)
- output_file.write('#include <%s>\n' % (GTEST_H_OUTPUT,))
+ output_file.write('#include "%s"\n' % (GTEST_H_OUTPUT,))
else:
m = INCLUDE_SRC_FILE_REGEX.match(line)
if m: