Commit 705a43cc authored by Brad King's avatar Brad King

format.all: exclude clang-format-* since they are version-specific

parent 3fff801d
......@@ -31,6 +31,8 @@ function (add_formatter name type)
PROPERTY "formatter_${name}_tools" "${tools_exist}")
set_property(GLOBAL APPEND
PROPERTY "formatter_${name}_script" "${script}")
set_property(GLOBAL
PROPERTY "formatter_${name}_exclude_from_all" "0")
option("ENABLE_${name}" "Install the ${tool} formatter script" "${tools_exist}")
......@@ -82,6 +84,13 @@ if (formatters)
continue ()
endif ()
# Skip explicitly excluded formatters.
get_property(formatter_exclude_from_all GLOBAL
PROPERTY "formatter_${formatter}_exclude_from_all")
if (formatter_exclude_from_all)
continue ()
endif ()
# Do not reformat with check-only tools.
get_property(formatter_type GLOBAL
PROPERTY "formatter_${formatter}_type")
......
......@@ -5,5 +5,7 @@ foreach(v
configure_file(format.clang-format.in format.clang-format-${v} @ONLY)
configure_file(clang-format.yaml.in clang-format-${v}.yaml.in COPYONLY)
add_formatter(clang-format-${v} reformat clang-format-${v})
set_property(GLOBAL PROPERTY "formatter_clang-format-${v}_exclude_from_all" "1")
endforeach()
add_formatter(clang-format-kwsys reformat clang-format-3.8)
set_property(GLOBAL PROPERTY "formatter_clang-format-kwsys_exclude_from_all" "1")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment