Tweaked Cliche macros/ names

This commit is contained in:
Phil Nash 2014-02-10 17:30:12 +00:00
parent 4554155e3d
commit c98a97cf90
3 changed files with 17 additions and 13 deletions

View File

@ -9,8 +9,8 @@
#ifndef TWOBLUECUBES_CATCH_CLARA_H_INCLUDED #ifndef TWOBLUECUBES_CATCH_CLARA_H_INCLUDED
#define TWOBLUECUBES_CATCH_CLARA_H_INCLUDED #define TWOBLUECUBES_CATCH_CLARA_H_INCLUDED
#define CLICHE_CLARA_EMBEDDED_NAMESPACE Catch #define CLICHE_CLARA_OUTER_NAMESPACE Catch
#include "clara.h" #include "clara.h"
#undef CLICHE_CLARA_EMBEDDED_NAMESPACE #undef CLICHE_CLARA_OUTER_NAMESPACE
#endif // TWOBLUECUBES_CATCH_CLARA_H_INCLUDED #endif // TWOBLUECUBES_CATCH_CLARA_H_INCLUDED

View File

@ -5,20 +5,24 @@
* Distributed under the Boost Software License, Version 1.0. (See accompanying * Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/ */
#ifndef CLICHE_CLARA_EMBEDDED_NAMESPACE
// Only use header guard if we are not using an outer namespace
#ifndef CLICHE_CLARA_OUTER_NAMESPACE
# ifdef TWOBLUECUBES_CLARA_H_INCLUDED # ifdef TWOBLUECUBES_CLARA_H_INCLUDED
# ifndef TWOBLUECUBES_CLARA_H_ALREADY_INCLUDED
# define TWOBLUECUBES_CLARA_H_ALREADY_INCLUDED # define TWOBLUECUBES_CLARA_H_ALREADY_INCLUDED
# endif
# else # else
# define TWOBLUECUBES_CLARA_H_INCLUDED # define TWOBLUECUBES_CLARA_H_INCLUDED
# endif # endif
#endif #endif
#ifndef TWOBLUECUBES_CLARA_H_ALREADY_INCLUDED #ifndef TWOBLUECUBES_CLARA_H_ALREADY_INCLUDED
#include "catch_text.h" // This will get moved out too #include "catch_text.h" // This will get moved out too
#ifdef CLICHE_CLARA_EMBEDDED_NAMESPACE // Use optional outer namespace
namespace CLICHE_CLARA_EMBEDDED_NAMESPACE { #ifdef CLICHE_CLARA_OUTER_NAMESPACE
namespace CLICHE_CLARA_OUTER_NAMESPACE {
#endif #endif
namespace Clara { namespace Clara {
@ -593,7 +597,7 @@ namespace Clara {
} // end namespace Clara } // end namespace Clara
#ifdef CLICHE_CLARA_EMBEDDED_NAMESPACE #ifdef CLICHE_CLARA_OUTER_NAMESPACE
} // end embedded namespace } // end embedded namespace
#endif #endif

View File

@ -9,7 +9,7 @@
#pragma clang diagnostic ignored "-Wpadded" #pragma clang diagnostic ignored "-Wpadded"
#endif #endif
#include "internal/clara.h" #include "internal/clara.h" // This will does not declare Clara within the Catch namespace
#include "catch.hpp" #include "catch.hpp"