1
0
Fork 0

Merge pull request #4718 from khang06/clang-format-spaces-fix

Fix clang-format target when using a path with spaces on Windows
This commit is contained in:
James Rowe 2019-04-02 19:14:35 -06:00 committed by GitHub
commit 14730ed560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -336,7 +336,7 @@ if (CLANG_FORMAT)
set(CCOMMENT "Running clang format against all the .h and .cpp files in src/") set(CCOMMENT "Running clang format against all the .h and .cpp files in src/")
if (WIN32) if (WIN32)
add_custom_target(clang-format add_custom_target(clang-format
COMMAND powershell.exe -Command "Get-ChildItem ${SRCS}/* -Include *.cpp,*.h -Recurse | Foreach {${CLANG_FORMAT} -i $_.fullname}" COMMAND powershell.exe -Command "Get-ChildItem '${SRCS}/*' -Include *.cpp,*.h -Recurse | Foreach {&'${CLANG_FORMAT}' -i $_.fullname}"
COMMENT ${CCOMMENT}) COMMENT ${CCOMMENT})
elseif(MINGW) elseif(MINGW)
add_custom_target(clang-format add_custom_target(clang-format