diff options
author | Hannes Steffenhagen <cubicentertain@gmail.com> | 2019-05-09 20:09:21 +0300 |
---|---|---|
committer | Hannes Steffenhagen <cubicentertain@gmail.com> | 2019-05-09 20:09:21 +0300 |
commit | 0551cad46788790fa421cf1cb0575a1e3e12c131 (patch) | |
tree | 026c05fd33c0556196cb651417d85b3c18036dca /CMakeLists.txt | |
parent | 457fb256092baf060b0eb952f84c8e8712bf3ce0 (diff) | |
parent | b74b286d5e333561b0f1ef1abd18de2606624455 (diff) |
Merge branch 'master' into hunterization
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c10d025..ff226ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,12 +54,21 @@ target_compile_definitions(GSL INTERFACE ) # add include folders to the library and targets that consume it -target_include_directories(GSL INTERFACE - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> - $<INSTALL_INTERFACE:include> -) +# the SYSTEM keyword suppresses warnings for users of the library +if(GSL_STANDALONE_PROJECT) + target_include_directories(GSL INTERFACE + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:include> + ) +else() + target_include_directories(GSL SYSTEM INTERFACE + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:include> + ) +endif() + -if ((CMAKE_VERSION GREATER 3.7.9) OR (CMAKE_VERSION EQUAL 3.7.9)) +if (CMAKE_VERSION VERSION_GREATER 3.7.8) if (MSVC_IDE) option(VS_ADD_NATIVE_VISUALIZERS "Configure project to use Visual Studio native visualizers" TRUE) else() |