catch_clara.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Created by Phil on 10/2/2014.
  3. * Copyright 2014 Two Blue Cubes Ltd. All rights reserved.
  4. *
  5. * Distributed under the Boost Software License, Version 1.0. (See accompanying
  6. * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. *
  8. */
  9. #ifndef TWOBLUECUBES_CATCH_CLARA_H_INCLUDED
  10. #define TWOBLUECUBES_CATCH_CLARA_H_INCLUDED
  11. // Use Catch's value for console width (store Clara's off to the side, if present)
  12. #ifdef CLARA_CONFIG_CONSOLE_WIDTH
  13. #define CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH
  14. #undef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH
  15. #endif
  16. #define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_CONFIG_CONSOLE_WIDTH-1
  17. #ifdef __clang__
  18. #pragma clang diagnostic push
  19. #pragma clang diagnostic ignored "-Wweak-vtables"
  20. #pragma clang diagnostic ignored "-Wexit-time-destructors"
  21. #pragma clang diagnostic ignored "-Wshadow"
  22. #endif
  23. #include "../external/clara.hpp"
  24. #ifdef __clang__
  25. #pragma clang diagnostic pop
  26. #endif
  27. // Restore Clara's value for console width, if present
  28. #ifdef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH
  29. #define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH
  30. #undef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH
  31. #endif
  32. #endif // TWOBLUECUBES_CATCH_CLARA_H_INCLUDED