From ffe61e5ba1721340ca51d56bae3ddaca415fb5bc Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Thu, 15 May 2014 08:21:13 -0300 Subject: [PATCH] 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. --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c242f11bc..11e0aaf604 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,17 +55,17 @@ include_directories("${PROJECT_SOURCE_DIR}/src") include(CheckLibraryExists) find_package(LibUV REQUIRED) -include_directories(${LIBUV_INCLUDE_DIRS}) +include_directories(SYSTEM ${LIBUV_INCLUDE_DIRS}) find_package(Msgpack REQUIRED) -include_directories(${MSGPACK_INCLUDE_DIRS}) +include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS}) find_package(LuaJit REQUIRED) -include_directories(${LUAJIT_INCLUDE_DIRS}) +include_directories(SYSTEM ${LUAJIT_INCLUDE_DIRS}) find_package(LibIntl) if(LibIntl_FOUND) - include_directories(${LibIntl_INCLUDE_DIR}) + include_directories(SYSTEM ${LibIntl_INCLUDE_DIR}) endif() # Determine platform's threading library. Set CMAKE_THREAD_PREFER_PTHREAD