From 18cb76130989c26dbb4ecf3fde616fd9142ff06f Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco-Claraco Date: Tue, 18 Aug 2020 08:49:37 +0200 Subject: [PATCH] Include 3rdparty libraries as 'system' headers to avoid warnings --- gtsam/CMakeLists.txt | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/gtsam/CMakeLists.txt b/gtsam/CMakeLists.txt index 8736a5954..e7b1b3b65 100644 --- a/gtsam/CMakeLists.txt +++ b/gtsam/CMakeLists.txt @@ -133,6 +133,18 @@ endif() # paths so that the compiler uses GTSAM headers in our source directory instead # of any previously installed GTSAM headers. target_include_directories(gtsam BEFORE PUBLIC + # main gtsam includes: + $ + $ + # config.h + $ + # unit tests: + $ +) +# 3rdparty libraries: use the "system" flag so they are included via "-isystem" +# and warnings (and warnings-considered-errors) in those headers are not +# reported as warnings/errors in our targets: +target_include_directories(gtsam SYSTEM BEFORE PUBLIC # SuiteSparse_config $ $ @@ -141,13 +153,6 @@ target_include_directories(gtsam BEFORE PUBLIC # CCOLAMD $ $ - # main gtsam includes: - $ - $ - # config.h - $ - # unit tests: - $ ) if(GTSAM_SUPPORT_NESTED_DISSECTION) target_include_directories(gtsam BEFORE PUBLIC