From 75c10df2d84948737ba4bebbabb85aa539a55697 Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Tue, 2 Mar 2021 12:46:30 +0100 Subject: [PATCH] prevent to test fetcht packeage too use only explicit add_test() --- CMakeLists.txt | 5 +++-- GNUmakefile | 5 +++-- test/CMakeLists.txt | 8 +++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f09931..44ac5ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,8 +64,9 @@ set_target_properties( # being a cross-platform target, we enforce standards conformance on MSVC target_compile_options(Greeter PUBLIC $<$:/permissive>) -# Link dependencies Note Either: target_link_libraries(Greeter PUBLIC -# $) Or: +# Link dependencies Note: + +# Either: target_link_libraries(Greeter PUBLIC $) Or: target_link_libraries(Greeter PUBLIC fmt::fmt) set(INCLUDE_INSTALL_DIR include/${PROJECT_NAME}-${PROJECT_VERSION}) diff --git a/GNUmakefile b/GNUmakefile index 951eb5c..df53043 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -44,10 +44,11 @@ test: install # all together all: test - cmake -S $@ -B build/$@ -G "${GENERATOR}" -DCMAKE_PREFIX_PATH=${ROOT} -DTEST_INSTALLED_VERSION=1 -DENABLE_TEST_COVERAGE=1 -DUSE_STATIC_ANALYZER=clang-tidy + cmake -S $@ -B build/$@ -G "${GENERATOR}" -DCMAKE_PREFIX_PATH=${ROOT} -DTEST_INSTALLED_VERSION=1 -DENABLE_TEST_COVERAGE=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DUSE_STATIC_ANALYZER=clang-tidy cmake --build build/$@ cmake --build build/$@ --target test - cmake --build build/$@ --target check-format + # cmake --build build/$@ --target check-format + # TODO builddriver run-clang-tidy.py -p build/$@ -checks='-*,modernize-*,misc-*,hicpp-*,cert-*,readability-*,portability-*,performance-*,google-*' # GenerateDocs doc: diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 82cfaa0..bbfa35f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -59,10 +59,12 @@ endif() enable_testing() # Note: doctest and similar testing frameworks can automatically configure CMake tests. For other -# testing frameworks add the tests target instead: add_test(NAME greeterTests COMMAND GreeterTests) +# testing frameworks add the tests target instead: +add_test(NAME greeterTests COMMAND GreeterTests) -include(${doctest_SOURCE_DIR}/scripts/cmake/doctest.cmake) -doctest_discover_tests(GreeterTests) +# include(${doctest_SOURCE_DIR}/scripts/cmake/doctest.cmake) + +# doctest_discover_tests(GreeterTests) # ---- code coverage ----