about summary refs log tree commit diff
path: root/CMake
diff options
context:
space:
mode:
Diffstat (limited to 'CMake')
-rw-r--r--CMake/AbseilHelpers.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake
index 5402bf510513..e4289c116892 100644
--- a/CMake/AbseilHelpers.cmake
+++ b/CMake/AbseilHelpers.cmake
@@ -135,7 +135,9 @@ function(absl_cc_library)
     endif()
 
     # Check if this is a header-only library
-    if ("${ABSL_CC_LIB_SRCS}" STREQUAL "")
+    set(ABSL_CC_SRCS "${ABSL_CC_LIB_SRCS}")
+    list(FILTER ABSL_CC_SRCS EXCLUDE REGEX ".*\\.h")
+    if ("${ABSL_CC_SRCS}" STREQUAL "")
       set(ABSL_CC_LIB_IS_INTERFACE 1)
     else()
       set(ABSL_CC_LIB_IS_INTERFACE 0)