I am trying to compile my program using CMake and want to supress the warnings coming from external libraries, which were not written by me.
I heard rumors that there are two ways to do this, either by
1. using a compiler-flag like
SET(CMAKE_CXX_FLAGS "-isystem${MYPROJECT_MAIN_DIR}/include")
or
2. by telling CMake that the include-folders belong to a system library by adding SYSTEM to the include-directories like this
INCLUDE_DIRECTORIES(SYSTEM /usr/include/externallibrary)
unfortunately, both versions do not seem to work.
Can anyone suggest a solution to me?
Martin