]> gitweb.hhaalo.de Git - discspan.git/commitdiff
change custom command for code coverage master
authorBastian Dehn <hhaalo@arcor.de>
Wed, 12 Nov 2025 19:37:48 +0000 (20:37 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Wed, 12 Nov 2025 19:48:04 +0000 (20:48 +0100)
libs/spandisc/tests/CMakeLists.txt

index d72204d2701e5ca9495bcf632a4176668591cbd5..f030c3fb7c5d73c614dc4b8fb1a992776ba99d7b 100644 (file)
@@ -16,14 +16,14 @@ add_custom_target(run-splitter-test
        ALL ./splitter-test
        DEPENDS splitter-test)
 
-add_custom_target(run-gcov
-       ALL gcov ../src/CMakeFiles/spandisc.dir/*.c.o
-       DEPENDS run-splitter-test)
-
-add_custom_target(run-lcov
-       ALL lcov --capture --directory  ../src/CMakeFiles/spandisc.dir --output-file coverage.info
-       DEPENDS run-gcov)
-
-add_custom_target(gen-html
-       ALL genhtml coverage.info --output-directory coverage
-       DEPENDS run-lcov)
\ No newline at end of file
+add_custom_command(TARGET run-splitter-test
+       POST_BUILD
+       COMMAND gcov
+               ${CMAKE_BINARY_DIR}/libs/spandisc/src/CMakeFiles/spandisc.dir/*.c.o
+       COMMAND lcov
+               --capture
+               --directory ${CMAKE_BINARY_DIR}/libs/spandisc/src/CMakeFiles/spandisc.dir
+               --output-file ${CMAKE_BINARY_DIR}/coverage.info
+       COMMAND genhtml
+               ${CMAKE_BINARY_DIR}/coverage.info
+               --output-directory ${CMAKE_BINARY_DIR}/coverage)
\ No newline at end of file