-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
breaking change how (sub)project command initialization works
Subprojects have to now explicitly define an initCommands function that registers the projects commands with registerCommands. This allows for subprojects to exist on multiple levels, e.g. to make a sub-project of Foldseek. your_tool.cpp needs to include now something as follows: std::vector<Command> yourToolCommands = { ... }; extern std::vector<Command> baseCommands; void init() { registerCommands(&baseCommands); registerCommands(&yourToolCommands); } void (*initCommands)(void) = init; instead of: std::vector<Command> commands = { ... }
- Loading branch information
1 parent
9b9383a
commit 1c08685
Showing
5 changed files
with
88 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,4 +108,6 @@ struct Categories { | |
CommandMode mode; | ||
}; | ||
|
||
void registerCommands(std::vector<Command>* cmd); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters