MCPcopy Create free account
hub / github.com/catchorg/Catch2 / generate_cpp

Function generate_cpp

tools/scripts/generateAmalgamatedFiles.py:115–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113 header.write('#endif // CATCH_AMALGAMATED_HPP_INCLUDED\n')
114
115def generate_cpp():
116 from glob import glob
117 cpp_files = sorted(glob(os.path.join(root_path, 'catch2', '**/*.cpp'), recursive=True))
118 with open(output_cpp, mode='w', encoding='utf-8') as cpp:
119 cpp.write(formatted_file_header(Version()))
120 cpp.write('\n#include "catch_amalgamated.hpp"\n')
121 concatenate_file(cpp, os.path.join(root_path, 'catch2/internal/catch_windows_h_proxy.hpp'), False)
122 for file in cpp_files:
123 concatenate_file(cpp, file, False)
124 print('Concatenated {} cpp files'.format(len(cpp_files)))
125
126if __name__ == "__main__":
127 generate_header()

Callers 1

Calls 5

VersionClass · 0.90
formatted_file_headerFunction · 0.85
concatenate_fileFunction · 0.85
printFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected