- Folders for recipes are named
chapter-N/recipe-M
, whereN
is the chapter number andM
is a number, i.e.01
,02
, etc. In each chapter we restart the recipe counter. - Each recipe can have more than one example subfolder. These subfolders are
named
*example*
. Any code must reside in these subfolders.
The README files that form the table of contents (main README.md, chapter READMEs and recipe READMEs are generated from title.txt and abstract.md files.
This means that you should not modify README.md files but rather only edit title.txt and abstract.md files.
To update the README files, run python contributing/generate-readmes.py
- this file updates READMEs in place.
We use 2 spaces instead of 4 spaces to reduce the printed page width. No tabs.
We use lowercase for commands, i.e.:
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
and not:
CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR)
It is OK to put commands on one line if it improves readability, e.g.:
list(APPEND CXX_BASIC_FLAGS "-g3" "-O1")
For line continuation we use the following style:
target_compile_options(asan-example
PUBLIC
${CXX_BASIC_FLAGS}
${_asan_flags}
)
set(_whathaveyou
item1
item2
item3
)
Start an internal variable (i.e. one that is not exposed to the user) with an underscore:
set(PUBLIC_VARIABLE "this one is exposed")
set(_temp "this one is internal")