1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

Avoid warning when building googletest with CMake >= 3.19

This commit is contained in:
Carles Fernandez 2021-01-25 22:19:18 +01:00
parent ecf20d38d6
commit 950111d0fe
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -63,9 +63,15 @@ if(NOT GOOGLETEST_FOUND)
${CMAKE_BINARY_DIR}/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_maind${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_BINARY_DIR}/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_maind${CMAKE_STATIC_LIBRARY_SUFFIX}
) )
endif() endif()
set(GOOGLETEST_GIT_TAG "v1.10.x")
if(CMAKE_VERSION VERSION_GREATER 3.18.99)
# workaround to avoid warning about deprecated CMakeLists.txt with CMake >= 3.19
# Remove after a stable release of Googletest including this fix
set(GOOGLETEST_GIT_TAG "d128fc8252d53baad6ea456fa08cbf9028d255f4")
endif()
ExternalProject_Add(gtest-${GNSSSDR_GTEST_LOCAL_VERSION} ExternalProject_Add(gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
GIT_REPOSITORY https://github.com/google/googletest GIT_REPOSITORY https://github.com/google/googletest
GIT_TAG v1.10.x GIT_TAG ${GOOGLETEST_GIT_TAG}
SOURCE_DIR ${CMAKE_BINARY_DIR}/thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION} SOURCE_DIR ${CMAKE_BINARY_DIR}/thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
BINARY_DIR ${CMAKE_BINARY_DIR}/gtest-${GNSSSDR_GTEST_LOCAL_VERSION} BINARY_DIR ${CMAKE_BINARY_DIR}/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
CMAKE_ARGS ${GTEST_COMPILER} CMAKE_ARGS ${GTEST_COMPILER}