From 56b01fdefccde0e8bdda56c2ed339df5df21c332 Mon Sep 17 00:00:00 2001 From: Leonid Fedorov Date: Mon, 11 Jul 2022 15:24:29 +0300 Subject: [PATCH] Workaround for gtest compile bug --- tests/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b9b464aa6..dd681ccd4 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -5,10 +5,17 @@ if (WITH_UNITTESTS) set(EXTERNAL_INSTALL_LOCATION ${CMAKE_BINARY_DIR}/external) ExternalProject_Add(googletest GIT_REPOSITORY https://github.com/google/googletest - GIT_TAG release-1.11.0 + GIT_TAG release-1.12.0 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION} -DBUILD_SHARED_LIBS=ON ) + # this is a workaround for gtest's bug still not closed + # https://github.com/google/googletest/issues/3659 + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + MY_CHECK_AND_SET_COMPILER_FLAG("-U__cpp_char8_t") + endif() + + include_directories(${EXTERNAL_INSTALL_LOCATION}/include) # lib64 for RPM-based distros link_directories(${EXTERNAL_INSTALL_LOCATION}/lib ${EXTERNAL_INSTALL_LOCATION}/lib64)