Skip to content

Commit

Permalink
Use Catch2
Browse files Browse the repository at this point in the history
  • Loading branch information
rollbear committed Nov 12, 2017
1 parent 636f21c commit f78af43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if (MASTER_PROJECT AND CMAKE_BUILD_TYPE MATCHES Debug)
endif()
file(
DOWNLOAD
https://raw.githubusercontent.com/philsquared/Catch/master/single_include/catch.hpp ${CATCH_DIR}/catch.hpp
https://raw.githubusercontent.com/catchorg/Catch2/master/single_include/catch.hpp ${CATCH_DIR}/catch.hpp
STATUS
status
LOG
Expand Down

2 comments on commit f78af43

@AndrewPaxie
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be premature.

I have had compile failures with Catch v2.0.1 in the configurations that use
g++ (any version) with Clang's libc++ (as supplied in Artful Aardvark package version 3.9.1-3).

The error message is (in part)

/usr/include/c++/v1/type_traits:2928:50: error: invalid use of incomplete type ‘struct Catch_global_namespace_dummy’
                  decltype(__is_constructible_test(declval<_Tp>(), declval<_Args>()...))
                           ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from test/compiling_tests_11.cpp:17:0:
build/catch/catch.hpp:538:8: note: forward declaration of ‘struct Catch_global_namespace_dummy’
 struct Catch_global_namespace_dummy;
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

It seems that Catch2 triggers some defect in g++.

Successful configurations include: Catch2 with Clang ; Catch2 with g++ and stdlibc++-v3.

My C++11 branch contains a change that freezes Catch at v1.11.0 using the path
https://raw.githubusercontent.com/catchorg/Catch2/v1.11.0/single_include/catch.hpp.

In the meantime I will do more to determine if this is a reported defect and what a
minimal test case might look like.

@AndrewPaxie
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I raised issue Make Catch_global_namespace_dummy a complete type in the Catch2 project summarizing the failure and suggesting a fix.

Please sign in to comment.