The JSON Compilation Database Format is a tool independent text format (based on JSON) to specify the build process of a (mostly C/C++) software system. 



Many tools can produce the file "compile_commands.json" starting from an existing Makefile, e.g.:


  1. compiledb - "tool for generating Clang JSON Compilation Database files for make-based build systems";
  2. Bear - "a tool that generates a compilation database for clang tooling";
  3. CMake - "an open-source, cross-platform family of tools designed to build, test and package software".


These three tools are included in the SAFe Toolset.


On top of that the SAFacilitator is able to read and understand this Compilation Database Format; so, supposing we have a codebase with a proper/working Makefile the user can:


  1. invoke one the above mentioned tools (compiledb is the recommended one) to convert the Makefile into a "compile_commands.json" file;
  2. employ the SAFacilitator to import the build information contained in the "compile_commands.json" into the project file.


This way the user does not need to write all project information, but she can derive the majority of it from the existing Makefile.


Of course the information derived from the original Makefile is tuned to command the target compilers and tools so the project file will still require some editing/modifications to properly drive the Static Analyzers.