Skip to content

Commit

Permalink
Only set flag -Wno-stringop-overflow for GCC (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumekln authored Aug 5, 2022
1 parent 4c5c6b3 commit 7710d51
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/sentencepiece EXCLUDE_F
if(MSVC)
set(SENTENCEPIECE_CXX_FLAGS "/w")
else()
set(SENTENCEPIECE_CXX_FLAGS "-Wno-all -Wno-extra -Wno-error -Wno-stringop-overflow")
set(SENTENCEPIECE_CXX_FLAGS "-Wno-all -Wno-extra -Wno-error")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(SENTENCEPIECE_CXX_FLAGS "${SENTENCEPIECE_CXX_FLAGS} -Wno-stringop-overflow")
endif()
endif()

set_target_properties(
Expand Down

0 comments on commit 7710d51

Please sign in to comment.