codingame-cpp-merge
codingame-cpp-merge copied to clipboard
Support more extensions, ignore other main files, and add a new option
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.