Skip to content

ccov-all-export on Windows #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stanczyk4 opened this issue Jun 11, 2023 · 1 comment
Closed

ccov-all-export on Windows #45

stanczyk4 opened this issue Jun 11, 2023 · 1 comment

Comments

@stanczyk4
Copy link

Most of the ccov-all commands have an if(WIN32) section to handle command substitution of 'cat ...'. The ccov-all-export does not.
Below is a snippet that fixes that, could you incorporate in next release?

# Export coverage information so continuous integration tools (e.g.
      # Jenkins) can consume it
      if(WIN32)
        add_custom_target(
          ccov-all-export
          COMMAND
            powershell -Command $$FILELIST = Get-Content
            ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/binaries.list\; llvm-cov.exe
            export $$FILELIST
            -instr-profile=${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/all-merged.profdata
            -format="text" ${EXCLUDE_REGEX} >
            ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/coverage.json
          DEPENDS ccov-all-processing)
      else()
        add_custom_target(
          ccov-all-export
          COMMAND
            ${LLVM_COV_PATH} export `cat
            ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/binaries.list`
            -instr-profile=${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/all-merged.profdata
            -format="text" ${EXCLUDE_REGEX} >
            ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/coverage.json
          DEPENDS ccov-all-processing)
      endif()
@StableCoder
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants