codingame-cpp-merge icon indicating copy to clipboard operation
codingame-cpp-merge copied to clipboard

Support more extensions, ignore other main files, and add a new option

Open hiiwave opened this issue 6 years ago • 0 comments

This PR is a combination of three commits. (I accidentally made a PR from my master branch in #6. Hence I closed it and reopened a new one here.)

Support more extensions

Supported extension list: ['.hpp', '.h', ".hh", ".H", ".hxx", ".h++"] ['.cpp', '.cc', ".C", ".cxx", ".c++"]

Ignore other source files with main definition

In some situations, people prefer putting multiple source files with main definitions into single directory (e.g. a folder for multiple problems in single contest)

When the main source file is designated with -m, this commit ignore other source files with main definition.

Add --ignore-cpp option to ignore other cpp files

When --ignore-cpp is specified, the merger considers main-file as the unique implementation file, i.e. it assumes all header files included in main-file are header-only libraries.

Example

Two examples are presented in example/ to show the usage.

hiiwave avatar May 10 '18 06:05 hiiwave