mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Fix fallback stringifier config
This commit is contained in:
parent
0c722564c3
commit
bda4b7df84
@ -177,6 +177,7 @@
|
||||
#cmakedefine CATCH_CONFIG_PREFIX_ALL
|
||||
#cmakedefine CATCH_CONFIG_WINDOWS_CRTDBG
|
||||
|
||||
|
||||
// ------
|
||||
// "Variable" defines, these have actual values
|
||||
// ------
|
||||
@ -184,18 +185,10 @@
|
||||
#define CATCH_CONFIG_DEFAULT_REPORTER "@CATCH_CONFIG_DEFAULT_REPORTER@"
|
||||
#define CATCH_CONFIG_CONSOLE_WIDTH @CATCH_CONFIG_CONSOLE_WIDTH@
|
||||
|
||||
// The logic here depends on CMake preprocessing of the file significantly.
|
||||
// If CMake has CATCH_CONFIG_FALLBACK_STRINGIFIER it will be define below,
|
||||
// and its value is written into the if. Thus, we undef the old placeholder
|
||||
// and then define the macro to the actual CMake-provided value.
|
||||
//
|
||||
// We can't do it without this indirection, because it is a string-variable
|
||||
// macro, so we need it's value, and there is no usable default value that
|
||||
// would let us have it always defined the way the other two are.
|
||||
#cmakedefine CATCH_CONFIG_FALLBACK_STRINGIFIER
|
||||
#if defined( CATCH_CONFIG_FALLBACK_STRINGIFIER )
|
||||
# undef CATCH_CONFIG_FALLBACK_STRINGIFIER
|
||||
# define CATCH_CONFIG_FALLBACK_STRINGIFIER @CATCH_CONFIG_FALLBACK_STRINGIFIER@
|
||||
#endif
|
||||
// Unlike the macros above, CATCH_CONFIG_FALLBACK_STRINGIFIER does not
|
||||
// have a good default value, so we cannot always define it, and cannot
|
||||
// even expose it as a variable in CMake. The users will have to find
|
||||
// out about it from docs and set it only if they use it.
|
||||
#cmakedefine CATCH_CONFIG_FALLBACK_STRINGIFIER @CATCH_CONFIG_FALLBACK_STRINGIFIER@
|
||||
|
||||
#endif // CATCH_USER_CONFIG_HPP_INCLUDED
|
||||
|
Loading…
Reference in New Issue
Block a user