Warning, /sdk/codevis/doc/dialog_codebase_generation.md is written in an unsupported language. File is not indexed.
0001 # compile_commands.json 0002 0003 A build folder with a `compile_commands.json` file is necessary to load a codebase, 0004 this will tell us all the compiler commands used to generate all binaries and how they 0005 interconnect, we will use this information to extract the data from your sources. 0006 0007 ## CMake: 0008 0009 Add option `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` to `cmake` while configuring the project. 0010 0011 Note that not all generators accept this flag. If you are using `MSVC` with CMake, use the `Ninja` generator. 0012 It can be either manually installed and added to `%PATH%` or downloaded using 0013 [clang-power-tools](https://github.com/Caphyon/clang-power-tools) plugin on visual studio code. 0014 0015 If you are on `linux`, `mac`, `msys` or `mingw`, use either the default, or the Ninja generator. 0016 0017 ## Meson: 0018 0019 Meson automatically generates the `compile_commands.json` on the build directory 0020 0021 ## GNU Makefiles / Autotools: 0022 0023 If your project is based on autotools or Gnu Makefiles, it is possible to use 0024 [Bear](https://github.com/rizsotto/Bear) tool to extract `compile_commands.json`. 0025 0026 # Non-lakosian folders 0027 0028 The code extractor process tries it's best to separate the sources it finds in lakosian package groups. 0029 But not everything on a project will be lakosian (for instance, third party libraries), so you need to 0030 specify those manually unless you want them to be (roughly) translated to Lakosian Packages. 0031 0032 To avoid packages being placed in the `non-lakosian` automatic group, you can set up [Semantic Rules](semantic_rules.md) to change 0033 the behavior of how things are parsed. 0034 0035 # Start the parse 0036 0037 The application will halt for a few minutes, while parsing happens in the background. The duration of the parsing phase is _less_ 0038 than a software compilation, but we will be running multiple instances of a compiler in parallel to extract every possible data 0039 that we can. So if you have an enormous software, this will also take the time needed.