Merge branch 'release9.2/fixes/make-install-fix' into release9.2/fixes/jenkins-fix
[dyninst.git] / cmake / warnings.cmake
1 if (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_C_COMPILER_ID} MATCHES INTEL)
2 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W -Wall -Wpointer-arith -Wcast-qual -Wcast-align")
3 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -Wpointer-arith -Wcast-qual -Woverloaded-virtual -Wcast-align -Wno-non-template-friend -Wno-unused-local-typedefs")
4 elseif (${CMAKE_C_COMPILER_ID} MATCHES Clang)
5 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W -Wall -Wpointer-arith -Wcast-qual")
6 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -Wpointer-arith -Wcast-qual -Woverloaded-virtual")
7 elseif (MSVC)
8 message(STATUS "TODO: Set up custom warning flags for MSVC")
9 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4251 /wd4091 /wd4503")
10 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251 /wd4091 /wd4503")
11 endif()