From 434c3ebd1a8720ef97ee4a4736b6bd3bda3b51a5 Mon Sep 17 00:00:00 2001 From: Sergey Yakubov <sergey.yakubov@desy.de> Date: Sat, 2 Dec 2017 11:56:51 +0100 Subject: [PATCH] remove extra ASTYLE target, correct exclude unittest template --- CMakeModules/astyle.cmake | 4 +--- CMakeModules/testing_cpp.cmake | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeModules/astyle.cmake b/CMakeModules/astyle.cmake index c0d960921..3e4d4c4fb 100644 --- a/CMakeModules/astyle.cmake +++ b/CMakeModules/astyle.cmake @@ -1,14 +1,12 @@ find_program(ASTYLE_EXECUTABLE astyle) -add_custom_target(ASTYLE) - if(ASTYLE_EXECUTABLE) message(STATUS "Found astyle, using astyle to format code of target ${target}.") add_custom_target(astyle ALL COMMAND ${ASTYLE_EXECUTABLE} -i --exclude=${PROJECT_BINARY_DIR} - --recursive -n --style=google --indent=spaces=4 + --recursive -n --style=google "${PROJECT_SOURCE_DIR}/*.cpp" "${PROJECT_SOURCE_DIR}/*.h" WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} VERBATIM diff --git a/CMakeModules/testing_cpp.cmake b/CMakeModules/testing_cpp.cmake index 01179b9c1..6b6564e9e 100644 --- a/CMakeModules/testing_cpp.cmake +++ b/CMakeModules/testing_cpp.cmake @@ -19,6 +19,7 @@ function(gtest target test_source_files test_libraries) if (CMAKE_COMPILER_IS_GNUCXX) include(CodeCoverage) APPEND_COVERAGE_COMPILER_FLAGS() + set (COVERAGE_EXCLUDES '*/unittests/*') SETUP_TARGET_FOR_COVERAGE(NAME coverage-${target} EXECUTABLE test-${target} ${target}) add_test(NAME coveragetest-${target} COMMAND ${CMAKE_MODULE_PATH}/check_test.sh -- GitLab