Skip to content

Commit

Permalink
Use gtest vcpkg module
Browse files Browse the repository at this point in the history
  • Loading branch information
lindkvis committed Jun 11, 2024
1 parent d4c33aa commit 9b31ff1
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
path = Bindings/Python/caffa
url = https://github.com/lindkvis/caffa-python.git

[submodule "ThirdParty/gtest"]
path = ThirdParty/gtest
url = https://github.com/google/googletest.git
[submodule "ThirdParty/vcpkg"]
path = ThirdParty/vcpkg
url = https://github.com/microsoft/vcpkg.git
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ set(UUID_BUILD_TESTS
OFF
CACHE INTERNAL "Build stduuid tests")

add_subdirectory(ThirdParty/gtest)
add_subdirectory(ThirdParty/stduuid)
add_subdirectory(ThirdParty/caffa-base)

Expand Down
4 changes: 3 additions & 1 deletion Core/Core_UnitTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ add_executable(${PROJECT_NAME} ${PROJECT_FILES})

source_group("" FILES ${PROJECT_FILES})

target_link_libraries(${PROJECT_NAME} gtest caffaCore ${THREAD_LIBRARY})
find_package(GTest CONFIG REQUIRED)

target_link_libraries(${PROJECT_NAME} GTest::gtest caffaCore ${THREAD_LIBRARY})

install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
3 changes: 2 additions & 1 deletion Core/IoCore_UnitTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ project(caffaIoCore_UnitTests)
add_executable(${PROJECT_NAME} cafIo_UnitTests.cpp cafIoBasicTest.cpp cafAdvancedTemplateTest.cpp cafIoNumberTest.cpp cafReadmeObjects.cpp)

find_package(nlohmann_json CONFIG REQUIRED)
find_package(GTest CONFIG REQUIRED)

target_link_libraries(${PROJECT_NAME} caffaCore ${THREAD_LIBRARY} nlohmann_json::nlohmann_json gtest)
target_link_libraries(${PROJECT_NAME} caffaCore ${THREAD_LIBRARY} nlohmann_json::nlohmann_json GTest::gtest)

target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

Expand Down
3 changes: 2 additions & 1 deletion Core/ProjectDataModel_UnitTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ set(PROJECT_FILES cafBasicTest.cpp cafProjectDataModel_UnitTests.cpp Child.cpp P
add_executable(${PROJECT_NAME} ${PROJECT_FILES})

find_package(nlohmann_json CONFIG REQUIRED)
find_package(GTest CONFIG REQUIRED)

target_link_libraries(${PROJECT_NAME} PRIVATE caffaCore gtest ${THREAD_LIBRARY} nlohmann_json::nlohmann_json)
target_link_libraries(${PROJECT_NAME} PRIVATE caffaCore GTest::gtest ${THREAD_LIBRARY} nlohmann_json::nlohmann_json)

source_group("" FILES ${PROJECT_FILES})

Expand Down
3 changes: 2 additions & 1 deletion RestInterface/RestInterface_UnitTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ add_executable(${PROJECT_NAME} ${PROJECT_FILES})
source_group("" FILES ${PROJECT_FILES})

find_package(Boost 1.71.0 REQUIRED COMPONENTS program_options)
find_package(GTest CONFIG REQUIRED)

target_link_libraries(
${PROJECT_NAME}
Boost::program_options
${THREAD_LIBRARY}
gtest
GTest::gtest
caffaCore
caffaRestInterface
caffaTestData)
Expand Down
1 change: 0 additions & 1 deletion ThirdParty/gtest
Submodule gtest deleted from f8d7d7

0 comments on commit 9b31ff1

Please sign in to comment.