From 3b7576d95ccc03a75b1c0cfdcadeadeb8d782115 Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Mon, 22 Mar 2021 16:48:42 +0400 Subject: [PATCH] Catch2: Treat catch2 headers as system. --- dependencies/catch2/Catch2/src/CMakeLists.txt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/dependencies/catch2/Catch2/src/CMakeLists.txt b/dependencies/catch2/Catch2/src/CMakeLists.txt index 2f3dd4a..03f396d 100644 --- a/dependencies/catch2/Catch2/src/CMakeLists.txt +++ b/dependencies/catch2/Catch2/src/CMakeLists.txt @@ -271,11 +271,19 @@ target_compile_features(Catch2 cxx_variadic_macros ) -target_include_directories(Catch2 - PUBLIC - $ - $ -) +if (NOT_SUBPROJECT) + target_include_directories(Catch2 + PUBLIC + $ + $ + ) +else() + target_include_directories(Catch2 + SYSTEM PUBLIC + $ + $ + ) +endif() add_library(Catch2WithMain STATIC