Skip to content

Commit

Permalink
FIX Format.cmake dir path in cmake-format args (#26) (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLongRunSmoke committed Jun 8, 2021
1 parent f9a03a4 commit 282c3cb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake-format.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ function(get_cmake_files)
cmake_policy(SET CMP0007 NEW)
string(REPLACE "\n" ";" filtered_files "${all_files}")
list(FILTER filtered_files INCLUDE REGEX ${_REGEX})
foreach(it ${filtered_files})
if(NOT EXISTS ${it} OR IS_DIRECTORY ${it})
list(REMOVE_ITEM filtered_files ${it})
endif()
endforeach()
if(CMAKE_FORMAT_EXCLUDE)
list(FILTER filtered_files EXCLUDE REGEX ${CMAKE_FORMAT_EXCLUDE})
endif()
Expand Down

0 comments on commit 282c3cb

Please sign in to comment.