INNER CODE UNIT · Python

FuseGTestH

sweeneychris/TheiaSfM · libraries/gtest/scripts/fuse_gtest_files.py:149

def FuseGTestH(gtest_root, output_dir):
  """Scans folder gtest_root to generate gtest/gtest.h in output_dir."""

  output_file = open(os.path.join(output_dir, GTEST_H_OUTPUT), 'w')
  processed_files = set()  # Holds all gtest headers we've processed.

  def ProcessFile(gtest_header_path):
    """Processes the given gtest header file."""

    # We don't process the same header twice.
    if gtest_header_path in processed_files:
      return

    processed_files.add(gtest_header_path)

    # Reads each line in the given gtest header.
    for line in open(os.path.join(gtest_root, gtest_header_path), 'r'):
      m = INCLUDE_GTEST_FILE_REGEX.match(line)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…