From 5762d835c336eae5b80be1f00edba15fc906a033 Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Mon, 19 Aug 2019 13:07:33 +0200
Subject: [PATCH] [CMake] Fix check headers introduced in #2610.

Boost::boost is an interface library and should be ignored.
---
 scripts/cmake/CheckHeaderCompilation.cmake | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/cmake/CheckHeaderCompilation.cmake b/scripts/cmake/CheckHeaderCompilation.cmake
index 50d07a1888b..498a0ea8ee5 100644
--- a/scripts/cmake/CheckHeaderCompilation.cmake
+++ b/scripts/cmake/CheckHeaderCompilation.cmake
@@ -30,7 +30,9 @@ function(_check_header_compilation TARGET)
     get_target_property(INCLUDE_DIRS ${TARGET} INCLUDE_DIRECTORIES)
     get_target_property(LINK_LIBS ${TARGET} LINK_LIBRARIES)
     foreach(LIB ${LINK_LIBS})
-        if(NOT TARGET ${LIB}) # Ignore non-existing targets
+        # Ignore non-existing targets or interface libs
+        get_target_property(LIB_TYPE ${LIB} TYPE)
+        if(NOT TARGET ${LIB} OR LIB_TYPE STREQUAL "INTERFACE_LIBRARY")
             continue()
         endif()
         get_target_property(TARGET_INCLUDE_DIRS ${LIB} INCLUDE_DIRECTORIES)
-- 
GitLab