find_program can do that for us. Additionally that loop was resetting the CLANG_FORMAT every time ninja was run, making it impossible to pass a specific -DCLANG_FORMAT=... to cmake. I've tried version 6 to 8 and formatting remains stable. clang 9 is when it breaks down because of AfterCaseLabel.
8.4 KiB
8.4 KiB