Skip to content

Commit

Permalink
git: add googletest submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaZotov committed Mar 21, 2024
1 parent 3524ac4 commit 4ffb57c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
[submodule "docs/scn"]
path = docs/scn
url = https://github.com/ostis-ai/scn-latex-plugin
[submodule "thirdparty/googletest"]
path = thirdparty/googletest
url = https://github.com/google/googletest.git
3 changes: 3 additions & 0 deletions thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if(${SC_BUILD_TESTS})
include(gtest.cmake)
endif()
1 change: 1 addition & 0 deletions thirdparty/googletest
Submodule googletest added at eff443
12 changes: 12 additions & 0 deletions thirdparty/gtest.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
add_library(gtest STATIC
"googletest/googletest/src/gtest-all.cc"
"googletest/googlemock/src/gmock-all.cc"
"googletest/googletest/src/gtest_main.cc"
)

target_include_directories(gtest
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/googletest/googletest
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/googletest/googletest/include
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/googletest/googlemock
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/googletest/googlemock/include
)

0 comments on commit 4ffb57c

Please sign in to comment.