Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
dc8d91ce
Commit
dc8d91ce
authored
Mar 24, 2014
by
Jesse Beder
Browse files
Add make format target to run clang-format
parent
d5958663
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
CMakeLists.txt
CMakeLists.txt
+5
-1
No files found.
CMakeLists.txt
View file @
dc8d91ce
...
...
@@ -153,7 +153,7 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR
set
(
yaml_cxx_flags
"-Wall
${
GCC_EXTRA_OPTIONS
}
-pedantic -Wno-long-long
${
yaml_cxx_flags
}
"
)
### Make specific
if
(
${
CMAKE_BUILD_TOOL
}
STREQUAL
make OR
${
CMAKE_BUILD_TOOL
}
STREQUAL
gmake
)
if
(
${
CMAKE_BUILD_TOOL
}
MATCHES
make OR
${
CMAKE_BUILD_TOOL
}
MATCHES
gmake
)
add_custom_target
(
debuggable $
(
MAKE
)
clean
COMMAND
${
CMAKE_COMMAND
}
-DCMAKE_BUILD_TYPE=Debug
${
CMAKE_SOURCE_DIR
}
COMMENT
"Adjusting settings for debug compilation"
...
...
@@ -162,6 +162,10 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR
COMMAND
${
CMAKE_COMMAND
}
-DCMAKE_BUILD_TYPE=Release
${
CMAKE_SOURCE_DIR
}
COMMENT
"Adjusting settings for release compilation"
VERBATIM
)
add_custom_target
(
format
COMMAND clang-format --style=file -i
${
all_sources
}
COMMENT
"Running clang-format"
VERBATIM
)
endif
()
endif
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment