Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

Commit

Permalink
Fix cmake builds when cmake version < 3.10 (#32)
Browse files Browse the repository at this point in the history
Summary:
Fix for the first part of #31

Test strategy:
Build with the fix, no longer get the error:
```
CMake Error at common/CMakeLists.txt:56 (gtest_discover_tests):
  Unknown CMake command "gtest_discover_tests".
```
Pull Request resolved: #32

Reviewed By: Zepheus

Differential Revision: D10216424

Pulled By: calebmarchent

fbshipit-source-id: 8d462a4254a9d5516ac2b00f1b062a6b7b8a7b77
  • Loading branch information
skindstrom authored and facebook-github-bot committed Oct 5, 2018
1 parent ddb66e3 commit 7ec656f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion logdevice/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
project(${PACKAGE_NAME} CXX)

enable_testing()
include(GoogleTest OPTIONAL RESULT_VARIABLE HAVE_CMAKE_GTEST)
# gtest_discover_tests was introduced in cmake 3.10
if(${CMAKE_VERSION} VERSION_EQUAL "3.10" OR ${CMAKE_VERSION} VERSION_GREATER "3.10")
include(GoogleTest OPTIONAL RESULT_VARIABLE HAVE_CMAKE_GTEST)
endif()

include (logdevice-functions)

include(build-config)
Expand Down

0 comments on commit 7ec656f

Please sign in to comment.