Tell cmake to use -isystem third-party includes

This adds the `SYSTEM` parameter to `include_directories`, which will tell cmake
to use `-isystem` instead of `-I` for specifying include directories. One
advantage is that compilers won't emit warnings for included files that belong
to dependencies.
This commit is contained in:
Thiago de Arruda 2014-05-15 08:21:13 -03:00
parent 21bd990603
commit ffe61e5ba1

View File

@ -55,17 +55,17 @@ include_directories("${PROJECT_SOURCE_DIR}/src")
include(CheckLibraryExists) include(CheckLibraryExists)
find_package(LibUV REQUIRED) find_package(LibUV REQUIRED)
include_directories(${LIBUV_INCLUDE_DIRS}) include_directories(SYSTEM ${LIBUV_INCLUDE_DIRS})
find_package(Msgpack REQUIRED) find_package(Msgpack REQUIRED)
include_directories(${MSGPACK_INCLUDE_DIRS}) include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS})
find_package(LuaJit REQUIRED) find_package(LuaJit REQUIRED)
include_directories(${LUAJIT_INCLUDE_DIRS}) include_directories(SYSTEM ${LUAJIT_INCLUDE_DIRS})
find_package(LibIntl) find_package(LibIntl)
if(LibIntl_FOUND) if(LibIntl_FOUND)
include_directories(${LibIntl_INCLUDE_DIR}) include_directories(SYSTEM ${LibIntl_INCLUDE_DIR})
endif() endif()
# Determine platform's threading library. Set CMAKE_THREAD_PREFER_PTHREAD # Determine platform's threading library. Set CMAKE_THREAD_PREFER_PTHREAD