diff options
author | Gil <mcg@google.com> | 2018-01-17 10:22:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-17 10:22:57 -0800 |
commit | c3664973a94a2c715b9c57583f5953483caf2cce (patch) | |
tree | a10a7def0ba8df627bfd0be7fa8f8cb90e0ad3f6 /cmake | |
parent | cac2c3ff7aa7b94e3776bb1282765ca78be977ae (diff) |
Simplify integration with googletest (#672)
This makes it possible to build the Firestore subproject with CLion
because it no longer needs to be told where googletest is.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/external/firestore.cmake | 1 | ||||
-rw-r--r-- | cmake/external/googletest.cmake | 24 |
2 files changed, 3 insertions, 22 deletions
diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index 2d0ef02..1a89435 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -31,7 +31,6 @@ ExternalProject_Add( CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=${FIREBASE_INSTALL_DIR} - ${GTEST_CMAKE_ARGS} BUILD_ALWAYS ON diff --git a/cmake/external/googletest.cmake b/cmake/external/googletest.cmake index c467b70..56a5f13 100644 --- a/cmake/external/googletest.cmake +++ b/cmake/external/googletest.cmake @@ -30,27 +30,9 @@ ExternalProject_Add( PREFIX ${PROJECT_BINARY_DIR}/external/googletest - CMAKE_ARGS - -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS:BOOL=OFF - + # Just download the sources without building. + CONFIGURE_COMMAND "" + BUILD_COMMAND "" INSTALL_COMMAND "" TEST_COMMAND "" ) - -ExternalProject_Get_Property( - googletest - SOURCE_DIR BINARY_DIR -) - -# Arguments to pass to another CMake invocation so that it can find googletest -# without installing it using the standard FindGTest module. -set(GTEST_INCLUDE_DIR ${SOURCE_DIR}/googletest/include) -set(GTEST_LIBRARY ${BINARY_DIR}/googlemock/gtest/libgtest.a) -set(GTEST_MAIN_LIBRARY ${BINARY_DIR}/googlemock/gtest/libgtest_main.a) -set( - GTEST_CMAKE_ARGS - -DGTEST_INCLUDE_DIR=${GTEST_INCLUDE_DIR} - -DGTEST_LIBRARY=${GTEST_LIBRARY} - -DGTEST_MAIN_LIBRARY=${GTEST_MAIN_LIBRARY} -) |