diff options
author | Gennadiy Civil <gennadiycivil@users.noreply.github.com> | 2019-06-07 13:08:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-07 13:08:18 -0400 |
commit | da10da05c262af0a9e8fa91789a272a3dec67655 (patch) | |
tree | ee627ebb15762855382153cb1cc8503aa44327c0 | |
parent | 577daedd51fe29b337dc5e5fb4d29a9129350f1a (diff) | |
parent | 6044c267e85a9c2feb6e2f3a800246dadcc03772 (diff) | |
download | googletest-da10da05c262af0a9e8fa91789a272a3dec67655.tar.gz googletest-da10da05c262af0a9e8fa91789a272a3dec67655.tar.bz2 googletest-da10da05c262af0a9e8fa91789a272a3dec67655.zip |
Merge pull request #2268 from kalaxy/fuse_spi_in_header
Fuse gtest-spi.h into the resulting header.
-rwxr-xr-x | googletest/scripts/fuse_gtest_files.py | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/googletest/scripts/fuse_gtest_files.py b/googletest/scripts/fuse_gtest_files.py index d0dd464f..fb0c3224 100755 --- a/googletest/scripts/fuse_gtest_files.py +++ b/googletest/scripts/fuse_gtest_files.py @@ -172,6 +172,7 @@ def FuseGTestH(gtest_root, output_dir): output_file.write(line) ProcessFile(GTEST_H_SEED) + ProcessFile(GTEST_SPI_H_SEED) output_file.close() @@ -193,20 +194,15 @@ def FuseGTestAllCcToFile(gtest_root, output_file): for line in open(os.path.join(gtest_root, gtest_source_file), 'r'): 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. - 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 - # 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. - if not GTEST_H_SEED in processed_files: - processed_files.add(GTEST_H_SEED) - output_file.write('#include "%s"\n' % (GTEST_H_OUTPUT,)) + # It's '#include "gtest/foo.h"'. + # 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. + if not GTEST_H_SEED in processed_files: + processed_files.add(GTEST_H_SEED) + output_file.write('#include "%s"\n' % (GTEST_H_OUTPUT,)) else: m = INCLUDE_SRC_FILE_REGEX.match(line) if m: |