Skip to content

Commit

Permalink
Merge pull request #2375 from scivision/correct-flag
Browse files Browse the repository at this point in the history
correction to #2360
  • Loading branch information
jhasse authored Feb 13, 2024
2 parents fd70676 + 8b42a30 commit 7ea6df3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ if(BUILD_TESTING)

# NOTE: gtest uninit some variables, gcc >= 1.11.3 may cause error on compile.
# Remove this comment and six lines below, once ninja deps gtest-1.11.0 or above.
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "1.11.3")
check_cxx_compiler_flag(-Wno-maybe-uninitialized flag_no_maybe_uninit)
if (flag_no_maybe_uninit)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "1.11.3")
check_cxx_compiler_flag(-Wmaybe-uninitialized flag_maybe_uninit)
if (flag_maybe_uninit)
target_compile_options(gtest PRIVATE -Wno-maybe-uninitialized)
endif()
endif()
Expand Down

0 comments on commit 7ea6df3

Please sign in to comment.