Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
ark-third-party/ | 12-May-2024 | - | 774 | 730 | ||
toolchain/ | 12-May-2024 | - | 894 | 758 | ||
ClangTidy.cmake | D | 12-May-2024 | 9.3 KiB | 188 | 169 | |
CodeStyle.cmake | D | 12-May-2024 | 4.6 KiB | 128 | 112 | |
CommonTesting.cmake | D | 12-May-2024 | 7.1 KiB | 176 | 152 | |
Definitions.cmake | D | 12-May-2024 | 16.1 KiB | 397 | 351 | |
Doxygen.cmake | D | 12-May-2024 | 1.9 KiB | 61 | 49 | |
HostTools.cmake | D | 12-May-2024 | 5.5 KiB | 149 | 129 | |
PandaAssembly.cmake | D | 12-May-2024 | 18.1 KiB | 517 | 455 | |
PandaCCache.cmake | D | 12-May-2024 | 837 | 20 | 18 | |
PandaCmakeFunctions.cmake | D | 12-May-2024 | 3.1 KiB | 62 | 57 | |
PostPlugins.cmake | D | 12-May-2024 | 1.8 KiB | 40 | 36 | |
README.md | D | 12-May-2024 | 2.3 KiB | 56 | 42 | |
Sanitizers.cmake | D | 12-May-2024 | 3.9 KiB | 100 | 86 | |
TemplateBasedGen.cmake | D | 12-May-2024 | 9.7 KiB | 254 | 219 | |
Testing.cmake | D | 12-May-2024 | 2.8 KiB | 85 | 77 |
README.md
1## Basic build using CMake 2 3Panda libraries can be built using CMake: 4``` 5$ mkdir build 6$ cd build 7$ cmake ${panda_dir} 8$ make 9``` 10 11Where ${panda_dir} is a path to panda dirrectory. 12These steps will create libraries and some debug targets (if you have installed additional libraries, like google-test, clang-format, clang-tidy, etc.). 13 14## Build directory structure 15 16In the current build directory structure, each project has its own subdirectory. For example, the vixl library is located inside the `third_party/vixl` folder. The root CMakeLists.txt has an entry for this directory: 17``` 18add_subdirectory(third_party/vixl) 19``` 20You may use built libraries in your component (e.g., `target_link_libraries(tests compiler base vixl)`), but for getting variables please use the INTERFACE includes (e.g. `target_include_directories(INTERFACE .)`). 21 22 23## Check style 24 25To check style, build the project and then also build style-checker targets (you must install clang-format and clang-tidy with libraries - look at scripts/bootstrap*.sh): 26``` 27$ make clang_format 28 Built target clang_format_opt_tests_graph_creation_test.cpp 29 Built target clang_format_opt_opt.h 30 ... 31 32$ make clang_tidy 33 Scanning dependencies of target copy_json 34 Move compile commands to root directory 35 ... 36 Built target copy_json 37 Scanning dependencies of target clang_tidy_opt_codegen_codegen.cpp 38 ... 39``` 40 41You may force fixes for clang-format issues, with the `make clang_force_format` command. 42Run `make help | grep clang` to see all possible clang-[format|style] targets. 43For example, to check style issues in the opt.cpp file, you can use corresponding clang-format target (`make clang_format_opt_opt.cpp`) or the clang-tidy one (`make clang_tidy_opt_opt.cpp`). To force clang-format code style - `make clang_force_format_opt_opt.cpp`. 44To check code-style through just one check-system - use `make clang_tidy` or `make clang_format`. 45 46Generated files: 47* `compile_commands.json` - json nija-commands file to correct execution clang-tidy. 48* Standard cmake-files: `CMakeCache.txt`, `Makefile`, `cmake_install.cmake` and `CMakeFiles` folder. 49 50[Coding style](../docs/coding-style.md) 51 52* Clang-tidy style file - `.clang-tidy` 53* Clang-format style file - `.clang-format` 54* Script to show diff through clang-format execution - `scripts/run-clang-format.py` 55 56