2016-11-03 12:06:33 +00:00
|
|
|
#
|
|
|
|
# Custom targets
|
|
|
|
#
|
|
|
|
|
2016-11-11 19:40:19 +00:00
|
|
|
# Target: userconfig {{{
|
|
|
|
|
|
|
|
configure_file(
|
|
|
|
${PROJECT_SOURCE_DIR}/cmake/templates/userconfig.cmake.in
|
|
|
|
${PROJECT_BINARY_DIR}/userconfig.cmake
|
|
|
|
IMMEDIATE @ONLY)
|
|
|
|
|
|
|
|
add_custom_target(userconfig COMMAND ${CMAKE_COMMAND}
|
|
|
|
-P ${PROJECT_BINARY_DIR}/userconfig.cmake)
|
|
|
|
|
|
|
|
# }}}
|
2016-11-03 12:06:33 +00:00
|
|
|
# Target: uninstall {{{
|
|
|
|
|
|
|
|
configure_file(
|
|
|
|
${PROJECT_SOURCE_DIR}/cmake/templates/uninstall.cmake.in
|
2016-11-19 05:22:44 +00:00
|
|
|
${PROJECT_BINARY_DIR}/cmake/uninstall.cmake
|
2016-11-03 12:06:33 +00:00
|
|
|
IMMEDIATE @ONLY)
|
|
|
|
|
|
|
|
add_custom_target(uninstall COMMAND ${CMAKE_COMMAND}
|
2016-11-19 05:22:44 +00:00
|
|
|
-P ${PROJECT_BINARY_DIR}/cmake/uninstall.cmake)
|
2016-11-03 12:06:33 +00:00
|
|
|
|
|
|
|
# }}}
|
2016-11-25 10:49:37 +00:00
|
|
|
# Target: codeformat (clang-format) {{{
|
2016-11-03 12:06:33 +00:00
|
|
|
|
2016-11-25 10:49:37 +00:00
|
|
|
add_custom_target(codeformat)
|
|
|
|
add_custom_command(TARGET codeformat COMMAND
|
|
|
|
${PROJECT_SOURCE_DIR}/common/clang-format.sh ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/include)
|
2016-11-03 12:06:33 +00:00
|
|
|
|
2016-11-25 10:49:37 +00:00
|
|
|
# }}}
|
|
|
|
# Target: codecheck (clang-tidy) {{{
|
2016-11-03 12:06:33 +00:00
|
|
|
|
2016-11-25 10:49:37 +00:00
|
|
|
add_custom_target(codecheck)
|
|
|
|
add_custom_command(TARGET codecheck COMMAND
|
|
|
|
${PROJECT_SOURCE_DIR}/common/clang-tidy.sh ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/src)
|
2016-11-03 12:06:33 +00:00
|
|
|
|
|
|
|
# }}}
|
2016-11-25 10:49:37 +00:00
|
|
|
# Target: codecheck-fix (clang-tidy + clang-format) {{{
|
|
|
|
|
|
|
|
add_custom_target(codecheck-fix)
|
|
|
|
add_custom_command(TARGET codecheck-fix COMMAND
|
|
|
|
${PROJECT_SOURCE_DIR}/common/clang-tidy.sh ${PROJECT_BINARY_DIR} -fix ${PROJECT_SOURCE_DIR}/src)
|
2016-11-03 12:06:33 +00:00
|
|
|
|
|
|
|
# }}}
|