Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added gmock dependency.

  • Loading branch information...
commit b9138f540459bbd386f690c5013620f782bbfe39 1 parent 396214f
@glynos glynos authored
Showing with 16 additions and 1 deletion.
  1. +3 −0  .gitmodules
  2. +12 −1 CMakeLists.txt
  3. +1 −0  deps/gmock
View
3  .gitmodules
@@ -4,3 +4,6 @@
[submodule "uri"]
path = uri
url = git://github.com/cpp-netlib/uri
+[submodule "deps/gmock"]
+ path = deps/gmock
+ url = git://github.com/cpp-netlib/gmock
View
13 CMakeLists.txt
@@ -97,16 +97,27 @@ if(CPP-NETLIB_BUILD_TESTS)
if(MSVC11)
add_definitions(-D_VARIADIC_MAX=10)
endif(MSVC11)
+
if(MSVC)
set(gtest_force_shared_crt ON CACHE BOOL "Override gtest option.")
endif(MSVC)
- add_subdirectory(deps/gtest)
+
+ # gmock automatically searches for gtest
+ add_subdirectory(deps/gmock)
+
set(GTEST_ROOT ${CPP-NETLIB_SOURCE_DIR}/deps/gtest)
set(GTEST_FOUND ON)
set(GTEST_INCLUDE_DIRS ${GTEST_ROOT}/include)
set(GTEST_LIBRARIES gtest)
set(GTEST_MAIN_LIBRARIES gtest_main)
set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
+
+ set(GMOCK_ROOT ${CPP-NETLIB_SOURCE_DIR}/deps/gmock)
+ set(GMOCK_FOUND ON)
+ set(GMOCK_INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} {${GMOCK_DIR}/include)
+ set(GMOCK_LIBRARIES {$GTEST_LIBRARIES} gmock)
+ set(GMOCK_MAIN_LIBRARIES gmock_main)
+ set(GMOCK_BOTH_LIBRARIES ${GMOCK_LIBRARIES} ${GMOCK_MAIN_LIBRARIES})
endif()
add_subdirectory(uri)
1  deps/gmock
@@ -0,0 +1 @@
+Subproject commit 6b1759c3816d574bddde3e1725c51a811c8870e7
Please sign in to comment.
Something went wrong with that request. Please try again.