Skip to content

Building OpenCppCoverage

OpenCppCoverage edited this page Apr 8, 2020 · 5 revisions

This page describes how to build OpenCppCoverage from sources.

Requirements

  • Visual Studio 2019 version 16.4.X Desktop development with C++
  • Visual Studio 2019 modules MFC and ATL support (x86 and x64) and Visual C++ ATL support
  • Git (git.exe must be in your PATH)

Get sources

Simply run the command: git clone https://github.com/OpenCppCoverage/OpenCppCoverage.git.

Install third party libraries

Run the following command at the root of the repository: powershell.exe -executionpolicy bypass -File InstallThirdPartyLibraries.ps1.

Compilation

Open CppCoverage.sln and build the project OpenCppCoverage.

Remarks:

  • You need Visual Studio 2019 module C++/CLI support to load the project TestCppCli and to run the test CppCliTest.ManagedUnManagedModule
  • You need Visual Studio 2013 to run the test CodeCoverageRunnerTest.OptimizedBuild

Run OpenCppCoverage

msdia140.dll must be available in the $(TargetDir) of the project:

  • Copy VISUAL_STUDIO_ROOT\DIA SDK\bin\amd64\msdia140.dll to the folders x64\Debug and x64\Release
  • Copy VISUAL_STUDIO_ROOT\DIA SDK\bin\msdia140.dll to the folders Debug and Release.

To run OpenCppCoverage, right click on the project OpenCppCoverage, select Set as StartUp Project and run the project.

Clone this wiki locally