Skip to content

Commit

Permalink
[R-package] suppress Wcast-function-type warning in CMake-based gcc a…
Browse files Browse the repository at this point in the history
…nd MinGW builds (fixes #4273) (#4274)

* [R-package] suppress Wcast-function-type warning in CMake-based gcc and MinGW builds (fixes #4273)

* suppress warning from CMake side
  • Loading branch information
jameslamb authored May 15, 2021
1 parent bffa6ca commit db2e976
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ if(UNIX OR MINGW OR CYGWIN)
if(NOT USE_OPENMP)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas -Wno-unused-private-field")
endif()
if(__BUILD_FOR_R AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-function-type")
endif()
endif()

if(WIN32 AND MINGW)
Expand Down

0 comments on commit db2e976

Please sign in to comment.