Skip to content

Commit

Permalink
Google Test 1.8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
shmygol committed Mar 13, 2017
1 parent 200ab08 commit f660288
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ project (arduino_mock)

find_package(Threads REQUIRED)
add_subdirectory(lib/gtest)
add_subdirectory(lib/gmock)

message ("building arduino_mock")
message("Gtest include: ${GTEST_INCLUDE_DIRS}")
Expand Down Expand Up @@ -32,7 +31,7 @@ set_target_properties( arduino_mock
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/dist/bin"
)

add_dependencies(arduino_mock gtest gmock)
add_dependencies(arduino_mock gtest)

option(test "Build all tests." OFF)

Expand Down
17 changes: 0 additions & 17 deletions lib/gmock/CMakeLists.txt

This file was deleted.

8 changes: 5 additions & 3 deletions lib/gtest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ project(gtest_builder C CXX)
include(ExternalProject)

ExternalProject_Add(gtest
URL https://github.com/google/googletest/archive/release-1.7.0.zip
URL https://github.com/google/googletest/archive/release-1.8.0.zip
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/gtest
INSTALL_COMMAND ""
)

# Specify include dir
ExternalProject_Get_Property(gtest source_dir)
set(GTEST_INCLUDE_DIRS ${source_dir}/include PARENT_SCOPE)
set(GTEST_INCLUDE_DIRS ${source_dir}/googletest/include PARENT_SCOPE)
set(GMOCK_INCLUDE_DIRS ${source_dir}/googlemock/include PARENT_SCOPE)

# Specify MainTest's link libraries
ExternalProject_Get_Property(gtest binary_dir)
set(GTEST_LIBS_DIR ${binary_dir} PARENT_SCOPE)
set(GTEST_LIBS_DIR ${binary_dir}/googlemock/gtest PARENT_SCOPE)
set(GMOCK_LIBS_DIR ${binary_dir}/googlemock PARENT_SCOPE)

0 comments on commit f660288

Please sign in to comment.