Fix problem (hopefully) with single source definitions from Clara

- define CLARA_CONFIG_MAIN in the right place
This commit is contained in:
Phil Nash
2014-03-06 21:53:34 +00:00
parent 9b4c7fa0f7
commit 9abb27676d
4 changed files with 36 additions and 11 deletions

View File

@@ -17,6 +17,14 @@
#pragma clang diagnostic ignored "-Wpadded"
#endif
#ifdef CATCH_CONFIG_MAIN
# define CATCH_CONFIG_RUNNER
# ifndef CLARA_CONFIG_MAIN
# define CLARA_CONFIG_MAIN_NOT_DEFINED
# define CLARA_CONFIG_MAIN
# endif
#endif
#include "internal/catch_notimplemented_exception.h"
#include "internal/catch_context.h"
#include "internal/catch_test_registry.hpp"
@@ -37,13 +45,18 @@
#include "internal/catch_objc.hpp"
#endif
#if defined( CATCH_CONFIG_MAIN ) || defined( CATCH_CONFIG_RUNNER )
#ifdef CATCH_CONFIG_RUNNER
#include "internal/catch_impl.hpp"
#endif // CATCH_CONFIG_MAIN || CATCH_CONFIG_RUNNER
#endif
#ifdef CATCH_CONFIG_MAIN
#include "internal/catch_default_main.hpp"
#endif // CATCH_CONFIG_MAIN
#endif
#ifdef CLARA_CONFIG_MAIN_NOT_DEFINED
# undef CLARA_CONFIG_MAIN
#endif
//////

View File

@@ -13,7 +13,7 @@
namespace Catch {
// These numbers are maintained by a script
Version libraryVersion( 1, 0, 28, "master" );
Version libraryVersion( 1, 0, 29, "master" );
}
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED