Merge pull request #710 from mtavenrath/clang-format

Don't fail setting up a CMake build environment generation if clang-f…
This commit is contained in:
Andreas Süßenbach 2020-08-12 16:38:20 +02:00 committed by GitHub
commit 6082e868ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ if(CLANG_FORMAT_EXECUTABLE)
# get the clang-format version string # get the clang-format version string
execute_process(COMMAND ${CLANG_FORMAT_EXECUTABLE} "--version" OUTPUT_VARIABLE clangFormatVersion) execute_process(COMMAND ${CLANG_FORMAT_EXECUTABLE} "--version" OUTPUT_VARIABLE clangFormatVersion)
# filter out the actual version # filter out the actual version
string(REGEX MATCH [0123456789.]+ clangFormatVersion ${clangFormatVersion}) string(REGEX MATCH [0123456789.]+ clangFormatVersion "${clangFormatVersion}")
# we need at least version 10.0.0 ! # we need at least version 10.0.0 !
if (clangFormatVersion VERSION_LESS 10.0.0) if (clangFormatVersion VERSION_LESS 10.0.0)
message(WARNING " Found too old clang-format version <" ${clangFormatVersion} ">, we need version 10 and up to nicely format vulkan.hpp") message(WARNING " Found too old clang-format version <" ${clangFormatVersion} ">, we need version 10 and up to nicely format vulkan.hpp")