Skip to content

Commit 9a0b702

Browse files
Merge pull request #504 from andreagilardoni/cmake-improvements
Cmake improvements
2 parents eddc451 + b7a22f6 commit 9a0b702

22 files changed

+92
-27413
lines changed

.gitignore

+16
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,19 @@
66
.vs
77
build
88
.idea/
9+
### CMake ###
10+
CMakeLists.txt.user
11+
CMakeCache.txt
12+
CMakeFiles
13+
CMakeScripts
14+
Testing
15+
Makefile
16+
cmake_install.cmake
17+
install_manifest.txt
18+
compile_commands.json
19+
CTestTestfile.cmake
20+
_deps
21+
22+
### CMake Patch ###
23+
# External projects
24+
*-prefix/

extras/test/CMakeLists.txt

+12-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,23 @@ cmake_minimum_required(VERSION 2.8)
66

77
project(testArduinoIoTCloud)
88

9+
Include(FetchContent)
10+
11+
FetchContent_Declare(
12+
Catch2
13+
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
14+
GIT_TAG v3.4.0
15+
)
16+
17+
FetchContent_MakeAvailable(Catch2)
18+
919
##########################################################################
1020

1121
include_directories(include)
1222
include_directories(../../src)
1323
include_directories(../../src/cbor)
1424
include_directories(../../src/property)
1525
include_directories(../../src/utility/time)
16-
include_directories(external/catch/v2.13.10/include)
17-
include_directories(external/fakeit/v2.0.5/include)
1826

1927
##########################################################################
2028

@@ -100,5 +108,7 @@ add_executable(
100108
${TEST_TARGET_SRCS}
101109
)
102110

111+
target_link_libraries( ${TEST_TARGET} Catch2WithMain )
112+
103113
##########################################################################
104114

0 commit comments

Comments
 (0)