Skip to content

Commit c60d845

Browse files
committed
Update gtest used to v1.15.2
1 parent 9b5f4c5 commit c60d845

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ jobs:
846846
../
847847
fi
848848
os="${{ matrix.os }}"
849-
cmake --build . --target check-cppinterop --parallel ${{ env.ncpus }}
849+
cmake --build . --target check-cppinterop --parallel ${{ env.ncpus }}
850850
if [[ ("${os}" == "ubuntu"*) ]]; then
851851
valgrind --show-error-list=yes --track-origins=yes --error-exitcode=1 unittests/CppInterOp/CppInterOpTests
852852
fi

cmake/modules/GoogleTest.cmake

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,20 @@ if(WIN32)
1616
-Dgtest_force_shared_crt=ON
1717
BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config $<CONFIG>)
1818
elseif(APPLE)
19+
#FIXME: Temporarily remove -pedantic from CMAKE_CXX_FLAGS to avoid issues with building
20+
# latest version of gtest on MacOS (use of -Wc++17-attribute-extensions causes
21+
# issues due to [[maybe_unused]] in gtest)
1922
set(EXTRA_GTEST_OPTS -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT})
23+
set(CMAKE_CXX_FLAGS_TEMP_COPY ${CMAKE_CXX_FLAGS})
24+
string(REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
2025
endif()
2126

2227
include(ExternalProject)
2328
ExternalProject_Add(
2429
googletest
2530
GIT_REPOSITORY https://github.com/google/googletest.git
2631
GIT_SHALLOW 1
27-
GIT_TAG release-1.12.1
32+
GIT_TAG v1.15.2
2833
UPDATE_COMMAND ""
2934
# # Force separate output paths for debug and release builds to allow easy
3035
# # identification of correct lib in subsequent TARGET_LINK_LIBRARIES commands
@@ -50,6 +55,11 @@ ExternalProject_Add(
5055
TIMEOUT 600
5156
)
5257

58+
#FIXME: Related to fixme above which temporarily remodifies CMAKE_CXX_FLAGS
59+
if(APPLE)
60+
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_TEMP_COPY})
61+
endif()
62+
5363
# Specify include dirs for gtest and gmock
5464
ExternalProject_Get_Property(googletest source_dir)
5565
set(GTEST_INCLUDE_DIR ${source_dir}/googletest/include)

0 commit comments

Comments
 (0)