Skip to content
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

Enable profiling for test coverage when using Visual Studio MSVC #22

Closed
abdes opened this issue Dec 12, 2022 · 0 comments
Closed

Enable profiling for test coverage when using Visual Studio MSVC #22

abdes opened this issue Dec 12, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@abdes
Copy link
Owner

abdes commented Dec 12, 2022

In Debug builds, hen using MSVC as the compiler, the targets should be linked with /PROFILE to enable test coverage profiling.

In CompileOptions.cmake, the following modification when setting options for MSVC would do the job:

    ...
    foreach(target ${targets})
      target_compile_options(${target} PRIVATE /EHsc /MP /W4)
      target_link_options(${target} PRIVATE $<$<CONFIG:Debug>:/PROFILE>)
    endforeach()
@abdes abdes added the enhancement New feature or request label Dec 12, 2022
@abdes abdes self-assigned this Dec 12, 2022
@abdes abdes closed this as completed in 7348d0a Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant