Skip to content

Commit

Permalink
drop gmock dependency to fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
chistopher committed Oct 11, 2023
1 parent 36c7ad7 commit 9851767
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions source/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
#


# Get gtest/gmock
# Get gtest
FetchContent_Declare(
GTest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG v1.14.0
FIND_PACKAGE_ARGS
)


# # Prevent GoogleTest from overriding our compiler/linker options when building with Visual Studio
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) # Prevent GoogleTest from overriding our compiler/linker options when building with Visual Studio
set(INSTALL_GTEST OFF)
set(BUILD_GMOCK OFF) # see bug https://github.com/google/googletest/issues/4384
# since CMake 3.24 this tries a find_package(GTest) which should find GTest installed with `sudo apt install libgtest-dev`
# earlier CMake or a failed find_package(GTest) call lead to a download in the build dir
FetchContent_MakeAvailable(GTest)
Expand Down
2 changes: 1 addition & 1 deletion source/tests/girgs-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ target_link_libraries(${target}
PRIVATE
${DEFAULT_LIBRARIES}
${META_PROJECT_NAME}::girgs
GTest::gmock
GTest::gtest
)


Expand Down
2 changes: 1 addition & 1 deletion source/tests/girgs-test/Generator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <cmath>
#include <numeric>

#include <gmock/gmock.h>
#include <gtest/gtest.h>

#include <girgs/Generator.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

#include <random>

#include <gmock/gmock.h>
#include <gtest/gtest.h>

#include <girgs/SpatialTreeCoordinateHelper.h>

Expand Down
4 changes: 2 additions & 2 deletions source/tests/girgs-test/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <cmath>

double distance(const std::vector<double>& a, const std::vector<double>& b) {
Expand All @@ -16,6 +16,6 @@ double distance(const std::vector<double>& a, const std::vector<double>& b) {

int main(int argc, char* argv[])
{
::testing::InitGoogleMock(&argc, argv);
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
2 changes: 1 addition & 1 deletion source/tests/hypergirgs-test/AngleHelper_test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

#include <random>

#include <gmock/gmock.h>
#include <gtest/gtest.h>

#include <hypergirgs/AngleHelper.h>
#include <hypergirgs/Generator.h>
Expand Down
2 changes: 1 addition & 1 deletion source/tests/hypergirgs-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ target_link_libraries(${target}
PRIVATE
${DEFAULT_LIBRARIES}
${META_PROJECT_NAME}::hypergirgs
GTest::gmock_main
GTest::gtest_main
)


Expand Down
2 changes: 1 addition & 1 deletion source/tests/hypergirgs-test/HyperbolicTree_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <cmath>
#include <numeric>

#include <gmock/gmock.h>
#include <gtest/gtest.h>

#include <hypergirgs/HyperbolicTree.h>
#include <hypergirgs/Generator.h>
Expand Down
2 changes: 1 addition & 1 deletion source/tests/hypergirgs-test/Point_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include <gmock/gmock.h>
#include <gtest/gtest.h>

#include <hypergirgs/Point.h>
#include <hypergirgs/Generator.h>
Expand Down
2 changes: 1 addition & 1 deletion source/tests/hypergirgs-test/RadiusLayer_test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

#include <random>

#include <gmock/gmock.h>
#include <gtest/gtest.h>

#include <hypergirgs/RadiusLayer.h>

Expand Down

0 comments on commit 9851767

Please sign in to comment.