mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-08 12:21:17 +00:00
Run format target from project root
The CMake format target does not use the correct .clang-format file in out-of-source builds. This instructs CMake to use the project root as the working directory for running the clang-format command so that it finds the .clang-format file.
This commit is contained in:

committed by
Jesse Beder

parent
9f7babc3ff
commit
b11eaf1631
@@ -197,6 +197,7 @@ if (YAML_CPP_FORMAT_SOURCE AND YAML_CPP_CLANG_FORMAT_EXE)
|
||||
COMMAND clang-format --style=file -i $<TARGET_PROPERTY:yaml-cpp,SOURCES>
|
||||
COMMAND_EXPAND_LISTS
|
||||
COMMENT "Running clang-format"
|
||||
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
|
||||
VERBATIM)
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user