diff --git a/cmake/O2GetListOfMacros.cmake b/cmake/O2GetListOfMacros.cmake index adadbe06af6fa..e7316d5076622 100644 --- a/cmake/O2GetListOfMacros.cmake +++ b/cmake/O2GetListOfMacros.cmake @@ -18,7 +18,7 @@ include_guard() function(o2_get_list_of_macros dir varname) file(GLOB_RECURSE listOfMacros RELATIVE ${CMAKE_SOURCE_DIR} ${dir}/*.C) # Case sensitive filtering of .C files (to avoid .c files on Mac) - list(FILTER listOfMacros INCLUDE REGEX "^.*\\.C$") + list(FILTER listOfMacros INCLUDE REGEX "^[^.].*\\.C$") # Remove macros that were copied to the build directory, to deal with # the (non-recommended-but-can-happen) case where the build directory # is a subdirectory of the source dir