Skip to content

Catch2 update #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updating Catch2
In order to update catch2 the following changes were made:
- CMakeLists.txt: import catch2 with FetchContent_Declare, this will
  make it more flexible and easier to update
- removed main for tests, since it is not mandatory and it doesn't add
  any value of having it
- renaming includes in all the files
  • Loading branch information
andreagilardoni committed Feb 13, 2025
commit 2aaef7bf93d3d3985de034014ad465966a18f9dc
14 changes: 12 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,20 @@ cmake_minimum_required(VERSION 2.8)

project(test-ArduinoCore-API)

Include(FetchContent)

FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.4.0
)

FetchContent_MakeAvailable(Catch2)

##########################################################################

include_directories(..)
include_directories(include)
include_directories(external/catch/v2.13.9/include)

##########################################################################

Expand Down Expand Up @@ -118,7 +127,6 @@ set(TEST_DUT_SRCS
##########################################################################

set(TEST_TARGET_SRCS
src/main.cpp
src/dtostrf.cpp
src/itoa.cpp
src/MillisFake.cpp
Expand All @@ -144,5 +152,7 @@ add_executable(
${TEST_TARGET_SRCS}
)

target_link_libraries( ${TEST_TARGET} Catch2WithMain )

##########################################################################

Loading