Skip to content

Commit

Permalink
test: added googletest submodule and cmake files
Browse files Browse the repository at this point in the history
  • Loading branch information
charliekush committed May 29, 2024
1 parent ff376d2 commit a3cf21e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "lib/SparkFun_ICM-20948_ParticleLibrary"]
path = lib/SparkFun_ICM-20948_ParticleLibrary
url = https://github.com/UCSD-E4E/SparkFun_ICM-20948_ParticleLibrary.git
[submodule "external/googletest"]
path = external/googletest
url = https://github.com/google/googletest.git
18 changes: 18 additions & 0 deletions gtests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 3.14)
project(TestScheduler)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_definitions(-DTEST_VERSION=1 -DGTESTING=1)
include_directories($ENV{HOME}/local/include)
link_directories($ENV{HOME}/local/lib)

set(SOURCE_FILES
../tests/scheduler_test_system.cpp
../src/scheduler.cpp
${CMAKE_CURRENT_SOURCE_DIR}/scheduler_functions.cpp
${CMAKE_CURRENT_SOURCE_DIR}/gtest.cpp)

add_executable(test_scheduler.o ${SOURCE_FILES})
target_link_libraries(test_scheduler.o gtest gtest_main pthread)

0 comments on commit a3cf21e

Please sign in to comment.