From fa12ddfb5465154aa4ad663bec9012c1d9563851 Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Tue, 5 Jan 2021 17:46:49 +0000 Subject: [PATCH] e Delete ut_cmake_checks test program. This does not build against a clone of Boost.ut in Linux with gcc9, and it's not important enough to fix that. See https://github.com/claremacrae/ApprovalTests.cpp.CMakeSamples/issues/2 --- tests/CMake_Tests/CMakeLists.txt | 1 - .../ut_cmake_checks/CMakeLists.txt | 42 ------------------- .../ut_cmake_checks/ut_cmake_checks.cpp | 10 ----- 3 files changed, 53 deletions(-) delete mode 100644 tests/CMake_Tests/ut_cmake_checks/CMakeLists.txt delete mode 100644 tests/CMake_Tests/ut_cmake_checks/ut_cmake_checks.cpp diff --git a/tests/CMake_Tests/CMakeLists.txt b/tests/CMake_Tests/CMakeLists.txt index 660e13ea3..2dc54fad7 100644 --- a/tests/CMake_Tests/CMakeLists.txt +++ b/tests/CMake_Tests/CMakeLists.txt @@ -1,4 +1,3 @@ # Verify various bits of our CMake setup add_subdirectory(catch2_cmake_checks) add_subdirectory(doctest_cmake_checks) -add_subdirectory(ut_cmake_checks) diff --git a/tests/CMake_Tests/ut_cmake_checks/CMakeLists.txt b/tests/CMake_Tests/ut_cmake_checks/CMakeLists.txt deleted file mode 100644 index 0de7e6493..000000000 --- a/tests/CMake_Tests/ut_cmake_checks/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -if (NOT APPROVAL_TESTS_ENABLE_UT_INTEGRATION) - return() -endif () - -if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 9.2) OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 9.0)) - set(CMAKE_CXX_STANDARD 20) - - # This is the one users are recommended to use: - add_executable( - ut_cmake_checks_boost_ut ut_cmake_checks.cpp) - target_link_libraries( - ut_cmake_checks_boost_ut boost.ut) - add_test( - NAME - ut_cmake_checks_boost_ut - COMMAND - ut_cmake_checks_boost_ut - ) - - if (NOT_SUBPROJECT) - # Don't build this if we are in a sub-project, in case the user has pulled in - # a full Boost.ut clone, as in that case, our old, non-standard library won't exist... - # - # This one is historical, left over from when ApprovalTests.cpp was first created. - # We could encourage users to move away from it. - add_executable( - ut_cmake_checks_ut ut_cmake_checks.cpp) - target_link_libraries( - ut_cmake_checks_ut boost.ut) - add_test( - NAME - ut_cmake_checks_ut - COMMAND - ut_cmake_checks_ut - ) - endif () - - # Check that our real target name for Boost.UT matches that used in the Catch2 project - target_compile_definitions(boost.ut INTERFACE DUMMY_TEST_DEFINE) -else () - MESSAGE("The [Boost].UT integration with Approval Tests requires source_location support by the compiler, therefore it's disabled") -endif () diff --git a/tests/CMake_Tests/ut_cmake_checks/ut_cmake_checks.cpp b/tests/CMake_Tests/ut_cmake_checks/ut_cmake_checks.cpp deleted file mode 100644 index f6d16802f..000000000 --- a/tests/CMake_Tests/ut_cmake_checks/ut_cmake_checks.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include - -int main() -{ - using namespace boost::ut; - "hello world"_test = [] { - int i = 42; - expect(42_i == i); - }; -}