We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cfcdf8b commit 34805d0Copy full SHA for 34805d0
cmake/FindCLANG_FORMAT.cmake
@@ -41,11 +41,11 @@ if(CLANG_FORMAT_EXECUTABLE)
41
OUTPUT_VARIABLE clang_format_version
42
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
43
44
- if(clang_format_version MATCHES "^clang-format version .*")
+ if(clang_format_version MATCHES "^.*clang-format version .*")
45
# clang_format_version sample: "clang-format version 3.9.1-4ubuntu3~16.04.1
46
# (tags/RELEASE_391/rc2)"
47
string(REGEX
48
- REPLACE "clang-format version ([.0-9]+).*"
+ REPLACE "^.*clang-format version ([.0-9]+).*"
49
"\\1"
50
CLANG_FORMAT_VERSION
51
"${clang_format_version}")
0 commit comments