Code coverage with clang-cl compiler using llvm-cov generates report with tests files coverage missing - code-coverage

I am trying to get code coverage for a c/c++ llvm-clang project in visual studio IDE which is compiled as a static library and I have a test project written using Gtest to test the static library containing different source files, I can generate a coverage report using command llvm-cov.exe report "my-exe" -instr-profile=*.profdata but the report contains all the files except the files for which I have written the test cases. It simply ignores those files in the coverage.
I have used flags -fprofile-instr-generate, -fcoverage-mapping, and --coverage during the compilation of the static lib code. And it seems to generate .gcno and .gcda files as well. Why are the files for which the test cases written getting ignored?
Please note that the codes are compiled in Visual Studio IDE.Any help is appreciated.

Related

File opencv_cudaoptflow340.lib missing

I have compiled opencv3.4.0 with cuda9.1 support using CMake on Windows 10:
and then I built the INSTALL file in visual studio 2015 in OpenCV.sln.
But this is my Release folder:
The file opencv_cudaoptflow340.lib is not anywhere in C drive, however it should be in C:\opencv_3.4.0\opencv\build\lib\Release. How can I build opencv so that these library and dll files are generated?
You build opencv_worldxxx.lib all is inside as well in opencv_worldxxx.dll. You can unmark the option in Cmake related to opencv_world library. Than the libs and dll will be in separate files. Marked world all is in that single file. Unmarked option generates opencv_core opencv_videoio opencv_ml .lib .dll. You can decide one or another. There is difference in link one library or several libraries and consider this in packaging of your app. build in Cmake

Coverity support issue for Borland C++Builder

When I compile my code using Borland C++Builder (it is necessary for me to use only the Borland compiler), bcc32.exe is able to compile the code successfully. When I build this same code with the cov-build command inside of cmd.exe, the build fails with errors like:
cannot open source file "iostream"
What is the possible reason behind this, and how do I debug it?
Here is the code
Coverity requires that you configure your compiler in the same environment that you build it in. If you fail to do so, the configuration probes will not pick up your include paths, amongst other things.

Debugging Delphi programs with GDB

My goal is to use VS Code for developing Delphi application and I can already build Delphi projects (.dproj) and group projects (.groupproj) with debug information. But I use RAD Studio\9.0 for compilation and it puts symbols inside .rsm files and I am not sure, if GDB can debug executable using those files, because by default it tells me that "no debugging symbols found" even when it sees the .rsm files.
Is there a way to make GDB use the .rsm files or a way in MSBuild to let Delphi create some symbol format usable by GDB for debugging?

What project options to use for open source Delphi packages?

I've written some Delphi code I would like to share on GitHub. All code is contained in runtime and designtime packages as required. There are many "Project Options" to set for each project. (Output directories, search paths, compilation options, etc.) I've managed to find some default options that work well for my situation but reading other Q&As here it's clear there are multiple ways of working.
What project options should be used to allow the open source packages to easily be incorporated into individual projects?
I've recently started using NodeJS. The NPM package manager makes it super easy to use third-party packages in a project. Packages are installed with one simple command on the command line. Packages will automatically install any required dependencies.
PS: Feel free to edit this question if you would like to add extra things to consider.
Let's say you have this structure
MyComponent
Packages
DelphiXE7
Package2.dpr
source
bin
Delphi XE7
then set
Search Path
..\..\..\source
Unit output directory
..\..\..\bin\Delphi XE7\$(Platform)\$(Config)
After compilation for all supported platforms and both Release and Debug you will have this structure in the bin directory
MyComponent
Packages
DelphiXE7
Package2.dpr
source
bin
Delphi XE7
Android
Release
Debug
Win32
Release
Debug
Win64
Release
Debug
For installation you have to setup some path inside the IDE.
Environment
MYCOMPONENT => [root path to the files]
Library
Repeat that for all supported platforms
Library Path
$(MYCOMPONENT)\bin\Delphi XE7\$(Platform)\Release
Search Path
$(MYCOMPONENT)\source
Debug-DCU-Path
$(MYCOMPONENT)\bin\Delphi XE7\$(Platform)\Debug
If there are some language related units there is also a place to add (see Library - translated)
This ensures, that you have full debug feature (with Use Debug-DCU option set) and on release you have no debug code in your application.
Just a sidenote on libraries you should not want to install because you only use them in some projects.
Simply use the Optionset combined with a environment variable.
Here my SuperObject.optionset ($(USRLIB) points to a directory, where I collect all common used source code. And $(USRLIB)\ext is the place for all of the external libraries).
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DCC_UnitSearchPath>$(USRLIB)\ext\superobject;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
<Borland.ProjectType>OptionSet</Borland.ProjectType>
<BorlandProject>
<Delphi.Personality/>
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
</Project>
To use the superobject library I simply add the optionset to the project (right mouse click on build configuration) and everything is fine.

How to compile ActionScript projects from Github source

I am new to Flash Builder development environment. I need to use the library below in my project but don't know how to compile it to produce a .swc file. I tried importing the source folder as a Flash Builder project to no avail. Can someone help please?
This is the library I want to use:
https://github.com/fljot/Gestouch
You can build the library with both Maven and Ant, build files are already there, just take a look.
Precompiled SWCs (dev builds) are available here for now http://repository-fljot.forge.cloudbees.com/snapshot/org/gestouch/gestouch/

Resources