Modifying cmake configuration to compile and install TBB.
[dyninst.git] / cmake / warnings.cmake
1 if (CMAKE_COMPILER_IS_GNUCXX)
2   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W -Wall -Wpointer-arith -Wcast-qual")
3   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -Wpointer-arith -Wcast-qual -Woverloaded-virtual")
4   if (CMAKE_C_COMPILER_ID MATCHES GNU)
5     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align")
6     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wcast-align -Wno-non-template-friend -Wno-unused-local-typedefs -Wno-deprecated-declarations")
7   endif()
8 elseif (MSVC)
9   message(STATUS "TODO: Set up custom warning flags for MSVC")
10   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4251 /wd4091 /wd4503")
11   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251 /wd4091 /wd4503")
12 endif()