about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--CMake/AbseilHelpers.cmake9
-rw-r--r--absl/container/fixed_array_test.cc2
2 files changed, 9 insertions, 2 deletions
diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake
index 350282f7a0c4..49ef7dcc0b69 100644
--- a/CMake/AbseilHelpers.cmake
+++ b/CMake/AbseilHelpers.cmake
@@ -90,8 +90,15 @@ function(absl_cc_library)
     endif()
 
     # Check if this is a header-only library
+    # Note that as of February 2019, many popular OS's (for example, Ubuntu
+    # 16.04 LTS) only come with cmake 3.5 by default.  For this reason, we can't
+    # use list(FILTER...)
     set(ABSL_CC_SRCS "${ABSL_CC_LIB_SRCS}")
-    list(FILTER ABSL_CC_SRCS EXCLUDE REGEX ".*\\.h")
+    foreach(src_file IN LISTS ABSL_CC_SRCS)
+      if(${src_file} MATCHES ".*\\.(h|inc)")
+        list(REMOVE_ITEM ABSL_CC_SRCS "${src_file}")
+      endif()
+    endforeach()
     if ("${ABSL_CC_SRCS}" STREQUAL "")
       set(ABSL_CC_LIB_IS_INTERFACE 1)
     else()
diff --git a/absl/container/fixed_array_test.cc b/absl/container/fixed_array_test.cc
index 1679ba4f65db..6198e4bb14a1 100644
--- a/absl/container/fixed_array_test.cc
+++ b/absl/container/fixed_array_test.cc
@@ -150,7 +150,7 @@ TEST(FixedArrayTest, SmallObjects) {
   }
 
   {
-    // Arrays of > default size should be on the stack
+    // Arrays of > default size should be on the heap
     absl::FixedArray<int, 100> array(101);
     EXPECT_FALSE(IsOnStack(array));
   }