From be0894d079ac433bc2cfaa34670b6731d0a1426b Mon Sep 17 00:00:00 2001 From: neingeist Date: Mon, 18 Aug 2014 22:02:12 +0200 Subject: [PATCH] add a 'check' target to run cpplint --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 971b023..f31796c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,3 +28,13 @@ set_target_properties(future PROPERTIES LINK_FLAGS "-pthread") add_executable(return-type-deduction return-type-deduction.cpp) #XXX a bit ugly, as the -std=c++1y gets appended to the other flags, which say -std=c++11 set_source_files_properties(return-type-deduction.cpp PROPERTIES COMPILE_FLAGS "-std=c++1y") + +# checks +add_custom_command(OUTPUT check-cpplint + COMMAND find . -path ./ext -prune -or -path ./*CMakeFiles -prune -or \( -name *.cc -or -name *.cpp \) -print0 | xargs -0 cpplint + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Running cpplint" VERBATIM +) +add_custom_target(check + DEPENDS check-cpplint +)