Made Clara a “Cliche” header, which will be usable independently of Catch.

- This is just a first step. It still has a dependency on catch_text.h, which also needs to be made a Cliche header.
- These then need their own homes on GitHub.
This commit is contained in:
Phil Nash
2014-02-10 17:20:30 +00:00
parent 7eb5acc183
commit 4554155e3d
5 changed files with 37 additions and 4 deletions

View File

@@ -0,0 +1,16 @@
/*
* Created by Phil on 10/2/2014.
* Copyright 2014 Two Blue Cubes Ltd. All rights reserved.
*
* 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)
*
*/
#ifndef TWOBLUECUBES_CATCH_CLARA_H_INCLUDED
#define TWOBLUECUBES_CATCH_CLARA_H_INCLUDED
#define CLICHE_CLARA_EMBEDDED_NAMESPACE Catch
#include "clara.h"
#undef CLICHE_CLARA_EMBEDDED_NAMESPACE
#endif // TWOBLUECUBES_CATCH_CLARA_H_INCLUDED

View File

@@ -10,7 +10,7 @@
#include "catch_config.hpp"
#include "catch_common.h"
#include "clara.h"
#include "catch_clara.h"
#include <fstream>

View File

@@ -5,11 +5,22 @@
* 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)
*/
#ifndef TWOBLUECUBES_CLARA_H_INCLUDED
#ifndef CLICHE_CLARA_EMBEDDED_NAMESPACE
#ifdef TWOBLUECUBES_CLARA_H_INCLUDED
#define TWOBLUECUBES_CLARA_H_ALREADY_INCLUDED
#else
#define TWOBLUECUBES_CLARA_H_INCLUDED
#endif
#endif
#ifndef TWOBLUECUBES_CLARA_H_ALREADY_INCLUDED
#include "catch_text.h" // This will get moved out too
#ifdef CLICHE_CLARA_EMBEDDED_NAMESPACE
namespace CLICHE_CLARA_EMBEDDED_NAMESPACE {
#endif
namespace Clara {
namespace Detail {
template<typename T> struct RemoveConstRef{ typedef T type; };
@@ -582,5 +593,9 @@ namespace Clara {
} // end namespace Clara
#ifdef CLICHE_CLARA_EMBEDDED_NAMESPACE
} // end embedded namespace
#endif
#endif // TWOBLUECUBES_CLARA_H_ALREAD_INCLUDED
#endif // TWOBLUECUBES_CLARA_H_INCLUDED