@@ -96,11 +96,7 @@ if(CODE_COVERAGE AND NOT CODE_COVERAGE_ADDED)
96
96
set (CODE_COVERAGE_ADDED ON )
97
97
98
98
# Common Targets
99
- add_custom_target (
100
- ccov-preprocessing
101
- COMMAND ${CMAKE_COMMAND} -E make_directory
102
- ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}
103
- DEPENDS ccov-clean)
99
+ file (MAKE_DIRECTORY ${CMAKE_COVERAGE_OUTPUT_DIRECTORY} )
104
100
105
101
if (CMAKE_C_COMPILER_ID MATCHES "(Apple)?[Cc]lang"
106
102
OR CMAKE_CXX_COMPILER_ID MATCHES "(Apple)?[Cc]lang" )
@@ -276,7 +272,7 @@ function(target_code_coverage TARGET_NAME)
276
272
COMMAND
277
273
${CMAKE_COMMAND} -E echo "-object=$<TARGET_FILE:${TARGET_NAME} >" >>
278
274
${CMAKE_COVERAGE_OUTPUT_DIRECTORY} /binaries.list
279
- DEPENDS ccov-preprocessing ${TARGET_NAME} )
275
+ DEPENDS ${TARGET_NAME} )
280
276
281
277
if (NOT TARGET ccov-libs)
282
278
message (
@@ -324,7 +320,7 @@ function(target_code_coverage TARGET_NAME)
324
320
"${CMAKE_CURRENT_BINARY_DIR} /${target_code_coverage_COVERAGE_TARGET_NAME} .profraw"
325
321
>> ${CMAKE_COVERAGE_OUTPUT_DIRECTORY} /profraw.list
326
322
JOB_POOL ccov_serial_pool
327
- DEPENDS ccov-preprocessing ccov- libs ${TARGET_NAME} )
323
+ DEPENDS ccov-libs ${TARGET_NAME} )
328
324
329
325
# Merge the generated profile data so llvm-cov can process it
330
326
add_custom_target (
@@ -393,7 +389,7 @@ function(target_code_coverage TARGET_NAME)
393
389
add_custom_target (
394
390
ccov-run-${target_code_coverage_COVERAGE_TARGET_NAME}
395
391
COMMAND $<TARGET_FILE:${TARGET_NAME} > ${target_code_coverage_ARGS}
396
- DEPENDS ccov-preprocessing ${TARGET_NAME} )
392
+ DEPENDS ${TARGET_NAME} )
397
393
398
394
# Generate exclusion string for use
399
395
foreach (EXCLUDE_ITEM ${target_code_coverage_EXCLUDE} )
@@ -424,7 +420,7 @@ function(target_code_coverage TARGET_NAME)
424
420
${CMAKE_SOURCE_DIR} --capture ${EXTERNAL_OPTION} --output -file
425
421
${COVERAGE_INFO}
426
422
COMMAND ${EXCLUDE_COMMAND}
427
- DEPENDS ccov-preprocessing ${TARGET_NAME} )
423
+ DEPENDS ${TARGET_NAME} )
428
424
else ()
429
425
add_custom_target (
430
426
ccov-capture-${target_code_coverage_COVERAGE_TARGET_NAME}
@@ -436,7 +432,7 @@ function(target_code_coverage TARGET_NAME)
436
432
${CMAKE_SOURCE_DIR} --capture ${EXTERNAL_OPTION} --output -file
437
433
${COVERAGE_INFO}
438
434
COMMAND ${EXCLUDE_COMMAND}
439
- DEPENDS ccov-preprocessing ${TARGET_NAME} )
435
+ DEPENDS ${TARGET_NAME} )
440
436
endif ()
441
437
442
438
# Generates HTML output of the coverage information for perusal
@@ -644,15 +640,15 @@ function(add_code_coverage_all_targets)
644
640
COMMAND ${LCOV_PATH} --directory ${CMAKE_BINARY_DIR} --capture
645
641
--output -file ${COVERAGE_INFO}
646
642
COMMAND ${EXCLUDE_COMMAND}
647
- DEPENDS ccov-preprocessing ccov- all -processing)
643
+ DEPENDS ccov-all -processing)
648
644
else ()
649
645
add_custom_target (
650
646
ccov-all -capture
651
647
COMMAND ${CMAKE_COMMAND} -E rm -f ${COVERAGE_INFO}
652
648
COMMAND ${LCOV_PATH} --directory ${CMAKE_BINARY_DIR} --capture
653
649
--output -file ${COVERAGE_INFO}
654
650
COMMAND ${EXCLUDE_COMMAND}
655
- DEPENDS ccov-preprocessing ccov- all -processing)
651
+ DEPENDS ccov-all -processing)
656
652
endif ()
657
653
658
654
# Generates HTML output of all targets for perusal
0 commit comments