Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite4e0c48

Browse files
committed
Add CMAKE_CROSSCOMPILING_EMULATOR to code-coverage
When cross-compiling, the used emulator will be prefixed to the call.
1 parent4af5b40 commite4e0c48

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

‎code-coverage.cmake

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ function(target_code_coverage TARGET_NAME)
310310
add_custom_target(
311311
ccov-run-${target_code_coverage_COVERAGE_TARGET_NAME}
312312
COMMAND
313-
${CMAKE_COMMAND}-Eenv${target_code_coverage_PRE_ARGS}
313+
${CMAKE_COMMAND}-Eenv${CMAKE_CROSSCOMPILING_EMULATOR}
314+
${target_code_coverage_PRE_ARGS}
314315
LLVM_PROFILE_FILE=${target_code_coverage_COVERAGE_TARGET_NAME}.profraw
315316
$<TARGET_FILE:${TARGET_NAME}>${target_code_coverage_ARGS}
316317
COMMAND
@@ -389,8 +390,9 @@ function(target_code_coverage TARGET_NAME)
389390
# Run the executable, generating coverage information
390391
add_custom_target(
391392
ccov-run-${target_code_coverage_COVERAGE_TARGET_NAME}
392-
COMMAND${target_code_coverage_PRE_ARGS}$<TARGET_FILE:${TARGET_NAME}>
393-
${target_code_coverage_ARGS}
393+
COMMAND
394+
${CMAKE_CROSSCOMPILING_EMULATOR}${target_code_coverage_PRE_ARGS}
395+
$<TARGET_FILE:${TARGET_NAME}>${target_code_coverage_ARGS}
394396
DEPENDS${TARGET_NAME})
395397

396398
# Generate exclusion string for use
@@ -416,8 +418,9 @@ function(target_code_coverage TARGET_NAME)
416418
ccov-capture-${target_code_coverage_COVERAGE_TARGET_NAME}
417419
COMMAND${CMAKE_COMMAND}-Eremove-f${COVERAGE_INFO}
418420
COMMAND${LCOV_PATH}--directory${CMAKE_BINARY_DIR}--zerocounters
419-
COMMAND${target_code_coverage_PRE_ARGS}
420-
$<TARGET_FILE:${TARGET_NAME}>${target_code_coverage_ARGS}
421+
COMMAND
422+
${CMAKE_CROSSCOMPILING_EMULATOR}${target_code_coverage_PRE_ARGS}
423+
$<TARGET_FILE:${TARGET_NAME}>${target_code_coverage_ARGS}
421424
COMMAND
422425
${LCOV_PATH}--directory${CMAKE_BINARY_DIR}--base-directory
423426
${CMAKE_SOURCE_DIR}--capture${EXTERNAL_OPTION}--output-file
@@ -429,8 +432,9 @@ function(target_code_coverage TARGET_NAME)
429432
ccov-capture-${target_code_coverage_COVERAGE_TARGET_NAME}
430433
COMMAND${CMAKE_COMMAND}-Erm-f${COVERAGE_INFO}
431434
COMMAND${LCOV_PATH}--directory${CMAKE_BINARY_DIR}--zerocounters
432-
COMMAND${target_code_coverage_PRE_ARGS}
433-
$<TARGET_FILE:${TARGET_NAME}>${target_code_coverage_ARGS}
435+
COMMAND
436+
${CMAKE_CROSSCOMPILING_EMULATOR}${target_code_coverage_PRE_ARGS}
437+
$<TARGET_FILE:${TARGET_NAME}>${target_code_coverage_ARGS}
434438
COMMAND
435439
${LCOV_PATH}--directory${CMAKE_BINARY_DIR}--base-directory
436440
${CMAKE_SOURCE_DIR}--capture${EXTERNAL_OPTION}--output-file

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp