Clone the repo recursively:
git clone --recursive https://github.com/ericnantel/cmake_examples cmake_examples
- git
- cmake
- ninja (recommended)
- a C++ compiler (gcc, clang or msvc)
- bear (optional)
Some examples might require installing addtionnal packages on your system.
In Episode 03 you will need to install:
- doxygen
In Episode 04 you will need to install:
- googletest
- cmake --list-presets
- cmake --workflow --list-presets
- cmake --preset default
- cmake --fresh --preset default
- cmake --build --preset default
- ctest --preset default
- cmake --workflow --preset default
- cmake --workflow --fresh --preset default
Ex toml_parser (Episode 01):
- ./build/toml_parser
Ex test_simple (Episode 04):
- ./build/GoogleTests
- Episode 01 - C++ TOML Integration
- Episode 02 - C++ Unity Plugin For Games !
- Episode 03 - C++ Doxygen Docs
- Episode 04 - C++ Unit Testing (CTest + GoogleTest)
Usually Makefile and Ninja generators can export compile commands for Clangd (lsp), but if using Visual Studio or perhaps GCC then you may need to use Bear to intercept build commands and produce those compile commands. Also it produces a cleaner file imo. To use Bear, first you must install it (ideally with a package manager) and then you can do the following to configure and build a CMake project:
- bear -- cmake --list-presets
- bear -- cmake --fresh --preset default
- bear -- cmake --build --preset default
You can also use a workflow preset with bear:
- bear -- cmake --workflow --fresh --preset default
It should generate a compile_commands.json in the CMake root path.
Is subject to change at anytime. See Roadmap here
I am using Emacs to write ROADMAP.org. However GitHub doesn't render org files properly (especially tasks). So I am using pandoc to convert org to md files, such as ROADMAP.org.
Here is the command I use to convert .org to .md:
- pandoc --from=org --to=gfm ROADMAP.org -o ROADMAP.md
Eric Nantel (Canada) Senior Level
Make sure to follow me 😸 ⭐ Help this repository by giving it a star . It really helps me .