Skip to content

Commit ca0f5e4

Browse files
StephanKaarnemertz
authored andcommitted
updated libraries, changed catch2 for being compatible with major version 3
1 parent a1a87f6 commit ca0f5e4

6 files changed

Lines changed: 21 additions & 19 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ PROJECT(myproject
55
LANGUAGES CXX
66
VERSION 0.0.1)
77

8+
SET(CMAKE_CXX_STANDARD 20)
9+
810
INCLUDE(cmake/StandardProjectSettings.cmake)
911
INCLUDE(cmake/PreventInSourceBuilds.cmake)
1012
INCLUDE(cmake/CodeFormat.cmake)
@@ -20,7 +22,7 @@ CONFIGURE_FILE("templates/version.hpp.in" "${CMAKE_BINARY_DIR}/generated/include
2022

2123
# Link this 'library' to set the c++ standard / compile-time options requested
2224
ADD_LIBRARY(project_options INTERFACE)
23-
TARGET_COMPILE_FEATURES(project_options INTERFACE cxx_std_17)
25+
TARGET_COMPILE_FEATURES(project_options INTERFACE cxx_std_${CMAKE_CXX_STANDARD})
2426

2527
IF(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
2628
OPTION(ENABLE_BUILD_WITH_TIME_TRACE "Enable -ftime-trace to generate time tracing .json files on clang" OFF)

cmake/Conan.cmake

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,22 @@ macro(run_conan)
1010
conan_cmake_run(
1111
REQUIRES
1212
${CONAN_EXTRA_REQUIRES}
13-
catch2/2.13.9
14-
gtest/cci.20210126
13+
catch2/3.2.1
14+
gtest/1.12.1
1515
docopt.cpp/0.6.3
16-
fmt/8.1.1
17-
spdlog/1.10.0
18-
sml/1.1.5
19-
nlohmann_json/3.10.5
20-
boost/1.78.0
21-
crowcpp-crow/1.0+1
22-
cppzmq/4.8.1
23-
protobuf/3.20.0
16+
fmt/9.1.0
17+
spdlog/1.11.0
18+
sml/1.1.6
19+
nlohmann_json/3.11.2
20+
boost/1.80.0
21+
crowcpp-crow/1.0+3
22+
cppzmq/4.9.0
23+
protobuf/3.21.9
2424
OPTIONS
2525
${CONAN_EXTRA_OPTIONS}
2626
gtest:build_gmock=True
27+
SETTINGS
28+
compiler.cppstd=${CMAKE_CXX_STANDARD}
2729
BASIC_SETUP
2830
CMAKE_TARGETS # individual targets to link to
2931
BUILD

test/catch2/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ CATCH_DISCOVER_TESTS(
1515
TEST_PREFIX
1616
"catch_unittests."
1717
REPORTER
18-
xml
18+
JUnit
1919
OUTPUT_DIR
2020
.
2121
OUTPUT_PREFIX
@@ -32,7 +32,7 @@ CATCH_DISCOVER_TESTS(
3232
TEST_PREFIX
3333
"catch_constexpr."
3434
REPORTER
35-
xml
35+
JUnit
3636
OUTPUT_DIR
3737
.
3838
OUTPUT_PREFIX
@@ -51,7 +51,7 @@ CATCH_DISCOVER_TESTS(
5151
TEST_PREFIX
5252
"catch_relaxed_constexpr."
5353
REPORTER
54-
xml
54+
JUnit
5555
OUTPUT_DIR
5656
.
5757
OUTPUT_PREFIX

test/catch2/catch_main.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
#define CATCH_CONFIG_MAIN // This tells the catch header to generate a main
22

3-
#include <catch2/catch.hpp>
4-
5-
3+
#include <catch2/catch_all.hpp>

test/catch2/constexpr_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <catch2/catch.hpp>
1+
#include <catch2/catch_all.hpp>
22

33
constexpr unsigned int Factorial(unsigned int number) { return number <= 1 ? number : Factorial(number - 1) * number; }
44

test/catch2/tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <catch2/catch.hpp>
1+
#include <catch2/catch_all.hpp>
22

33
unsigned int Factorial(unsigned int number) { return number <= 1 ? number : Factorial(number - 1) * number; }
44

0 commit comments

Comments
 (0)