Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Test 1.8 compatibility #1

Merged
merged 1 commit into from
Nov 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)