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