diff --git a/CMakeLists.txt b/CMakeLists.txt index b0de85d..71011b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,11 +51,21 @@ target_compile_definitions(GSL INTERFACE ) # add include folders to the library and targets that consume it -target_include_directories(GSL INTERFACE - $ -) +# the SYSTEM keyword suppresses warnings for users of the library +if(GSL_STANDALONE_PROJECT) + target_include_directories(GSL INTERFACE + $ + ) +else() + target_include_directories(GSL SYSTEM INTERFACE + $ + ) +endif() + if ((CMAKE_VERSION GREATER 3.7.9) OR (CMAKE_VERSION EQUAL 3.7.9)) if (MSVC_IDE)