Files
aevolution/tools/check-format.cmake
T
dingo 214991c9a3
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m26s
Foundation / checks (tsan) (push) Successful in 11m44s
Foundation / checks (client) (push) Successful in 19m23s
Foundation / checks (network) (push) Successful in 19m45s
Foundation / checks (checks) (push) Successful in 45m39s
Foundation / checks (postgres) (push) Successful in 45m56s
Foundation / postgres-tools (push) Successful in 23s
Foundation / server-image (push) Successful in 31s
Foundation / image (push) Successful in 3m35s
M12.2b: test exact reserve-strata population candidate
2026-10-16 06:01:42 -04:00

16 lines
817 B
CMake

if(NOT FORMATTER OR NOT EXISTS "${FORMATTER}")
message(FATAL_ERROR "clang-format major 19 is required for format-check")
endif()
execute_process(COMMAND "${FORMATTER}" --version OUTPUT_VARIABLE version RESULT_VARIABLE result)
if(NOT result EQUAL 0 OR NOT version MATCHES "version 19\\.")
message(FATAL_ERROR "Expected clang-format major 19, got ${version}")
endif()
file(GLOB_RECURSE sources
"${SOURCE_ROOT}/include/*.hpp" "${SOURCE_ROOT}/src/*.cpp" "${SOURCE_ROOT}/src/*.hpp"
"${SOURCE_ROOT}/tests/*.hpp" "${SOURCE_ROOT}/apps/*.cpp" "${SOURCE_ROOT}/tests/*.cpp"
"${SOURCE_ROOT}/experiments/*.cpp" "${SOURCE_ROOT}/experiments/*.hpp")
execute_process(COMMAND "${FORMATTER}" --dry-run --Werror ${sources} RESULT_VARIABLE result)
if(NOT result EQUAL 0)
message(FATAL_ERROR "Formatting check failed")
endif()