File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -16,15 +16,20 @@ if(WIN32)
1616 -Dgtest_force_shared_crt=ON
1717 BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config $<CONFIG>)
1818elseif (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} " )
2025endif ()
2126
2227include (ExternalProject)
2328ExternalProject_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
5464ExternalProject_Get_Property(googletest source_dir)
5565set (GTEST_INCLUDE_DIR ${source_dir} /googletest/include )
You can’t perform that action at this time.
0 commit comments