C/C++
Last updated
Was this helpful?
Last updated
Was this helpful?
C and C++ support are provided by either Conan or via GCC/CLANG dependency files (experimental).
Conan support
In the ecosystem, the C/C++ analyser is triggered automatically when a “conanfile.txt", "conanfile.py", "conan.lock" is found in the project
If a lockfile exists, the analyser will load the dependencies directly from it. If missing, it will try to generate one using the Conan with the "create lock" command. Failing that, it will revert to a full "install" in order to generate a lockfile and subsequently collect the dependency tree.
When using the , the required tools may have to be installed and configured (Conan). This is not required when using the .
GCC / CLANG support (make / makefiles)
The experimental support for GCC/CLANG can be enabled using the --scan-gcc
flag. In this configuration the scanner will require the presence of dependency files (".d" files). The gcc/clang compiler can emit a “.d” file (short for dependency): each .d file lists all of the #include-ed headers your .c or .cpp file pulled in during pre-processing.
To get GCC or Clang to emit .d
files as part of your normal build, just add the -MD flag to your gcc/clang compile instruction. After that, you can simply launch Meterian with the additional --scan-gcc
flag in order for it to identify all system and external libraries.
The support is at the moment limited to Debian based builds.