Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CATCH_VERSION #1131

Closed
vpashka opened this issue Dec 13, 2017 · 4 comments
Closed

CATCH_VERSION #1131

vpashka opened this issue Dec 13, 2017 · 4 comments

Comments

@vpashka
Copy link

vpashka commented Dec 13, 2017

Hello..
How about add ?

#define CATCH_VERSION XYZ

or/and

#define CATCH_VERSION_MAJOR X
#define CATCH_VERSION_MINOR Y
#define CATCH_VERSION_RELEASE Z

@philsquared
Copy link
Collaborator

What do you want it for?

@vpashka
Copy link
Author

vpashka commented Dec 13, 2017

I use the catch in my project, which should be compiled for different versions of the distribution with different versions of catch (1x and 2.x).

For example:
#if CATCH_VERSION_MAJOR == 2
int returnCode = session.applyCommandLine( argc, argv );
#else
int returnCode = session.applyCommandLine( argc, argv, Catch::Session::OnUnusedOptions::Ignore );
#endif

@vpashka
Copy link
Author

vpashka commented Dec 14, 2017

This is not a big problem, but I think it would be convenient...

P.S. In any case, many thanks for 'catch'. It`s great project.. )

@vpashka
Copy link
Author

vpashka commented Jan 26, 2018

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants