aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a2857d71..02919994 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,3 +66,14 @@ foreach (family ${FAMILIES})
target_link_libraries(${target} LINK_PUBLIC ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
endforeach (target)
endforeach (family)
+
+file(GLOB_RECURSE CLANGFORMAT_FILES *.cc *.h)
+string(REGEX REPLACE "[^;]*/ice40/chipdbs/chipdb-[^ ]*.cc" "" CLANGFORMAT_FILES "${CLANGFORMAT_FILES}")
+
+add_custom_target(
+ clangformat
+ COMMAND clang-format
+ -style=file
+ -i
+ ${CLANGFORMAT_FILES}
+)