-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from baconpaul/version-stuff
A proposal for version check in clap-helpers
- Loading branch information
Showing
3 changed files
with
25 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma once | ||
|
||
/* | ||
* Check the clap version against the supported versions for this version of CLAP Helpers. | ||
* It defines two clap versions, a min and max version, and static asserts that the CLAP | ||
* we are using is in range. | ||
* | ||
* Workflow wise, if you are about to make clap-helpers incompatible with a version, set | ||
* the prior version to max, commit and push, and then move the min to current and max to 2 0 0 | ||
* again. | ||
*/ | ||
|
||
#include "clap/version.h" | ||
|
||
#if CLAP_VERSION_LT(1,2,0) | ||
static_assert(false, "Clap version must be at least 1.2.0") | ||
#endif | ||
|
||
#if CLAP_VERSION_GE(2,0,0) | ||
static_assert(false, "Clap version must be at most 1.x") | ||
#endif |