diff --git a/cmake/ctbench-api.cmake b/cmake/ctbench-api.cmake
index 37fb663..bbfb31d 100644
--- a/cmake/ctbench-api.cmake
+++ b/cmake/ctbench-api.cmake
@@ -1,4 +1,4 @@
-#! # CMake documentation
+#! # CMake API reference
## =============================================================================
#@
diff --git a/cmake/docs.cmake b/cmake/docs.cmake
index 56cf4fe..5d149ab 100644
--- a/cmake/docs.cmake
+++ b/cmake/docs.cmake
@@ -1,10 +1,11 @@
# Documentation options
set(DOXYGEN_EXTRACT_ALL YES)
set(DOXYGEN_GENERATE_TREEVIEW YES)
-set(DOXYGEN_EXCLUDE_PATTERNS */build/* */tests/* */build-docs/*)
+set(DOXYGEN_EXCLUDE_PATTERNS */build/* */tests/* */build-docs/* paper.md)
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE ${CMAKE_SOURCE_DIR}/readme.md)
set(DOXYGEN_EXAMPLE_PATH ${CMAKE_SOURCE_DIR})
-set(DOXYGENT_DOT_TRANSPARENT YES)
+set(DOXYGEN_DOT_TRANSPARENT YES)
+set(DOXYGEN_IMAGE_PATH ${CMAKE_SOURCE_DIR})
# ==============================================================================
# Doxygen Awesome CSS
diff --git a/docs/images/ExecuteCompiler.svg b/docs/images/ExecuteCompiler.svg
new file mode 100644
index 0000000..d9e36b9
--- /dev/null
+++ b/docs/images/ExecuteCompiler.svg
@@ -0,0 +1,677 @@
+
+
+
diff --git a/docs/images/InstantiateFunction.svg b/docs/images/InstantiateFunction.svg
new file mode 100644
index 0000000..b688044
--- /dev/null
+++ b/docs/images/InstantiateFunction.svg
@@ -0,0 +1,656 @@
+
+
+
diff --git a/hooks/pre-push b/hooks/pre-push
index c07f8e5..73b4d56 100755
--- a/hooks/pre-push
+++ b/hooks/pre-push
@@ -12,7 +12,10 @@ srcdir=$(pwd)
branch=$(git rev-parse --abbrev-ref HEAD)
-if [[ $branch -ne "main" ]]; then
+echo Current branch: $branch
+
+if [[ "$branch" != "main" ]]; then
+ echo "Branch is not main, exiting."
exit 0
fi
diff --git a/readme.md b/readme.md
index 5c60675..3102e9e 100644
--- a/readme.md
+++ b/readme.md
@@ -26,7 +26,7 @@ reference project for using ctbench.
## Using ctbench
-### Installing `ctbench`
+### Installing ctbench
```sh
git clone https://github.com/jpenuchot/ctbench
@@ -36,7 +36,7 @@ cmake --build --preset release
sudo cmake --build --preset release --target install
```
-### Integrating `ctbench` in your project
+### Integrating ctbench in your project
Use `find_package(ctbench REQUIRED)` after installing it.
@@ -44,6 +44,9 @@ The [Rule of Cheese](https://github.com/JPenuchot/rule-of-cheese) project can be
used as an example of how to use `ctbench`. It is the project that gave birth to
this tool and is maintained as `ctbench` evolves.
+You may refer to the [CMake API reference](generated-docs/ctbench-api.md) for
+more details.
+
### Declaring a benchmark case target
A benchmark case is represented by a C++ file. It will be "instanciated", ie.
@@ -157,6 +160,19 @@ per benchmark case. In this case, you would then get 3 graphs
(`ExecuteCompiler`, `Frontend`, and `Backend`) each with 5 curves (`enable_if`,
`enable_if_t`, `if_constexpr`, `control`, and `requires`).
+### Examples
+
+![](docs/images/ExecuteCompiler.svg)
+**Clang ExecuteCompiler time curve from
+[poacher](https://github.com/jpenuchot/poacher),
+generated by the *compare_by* plotter**
+
+![](docs/images/InstantiateFunction.svg)
+
+**Clang InstantiateFunction time curve from
+[poacher](https://github.com/jpenuchot/poacher),
+generated by the *compare_by* plotter**
+
## Additional
- [ctbench: compile time benchmarking for Clang](
@@ -164,3 +180,5 @@ per benchmark case. In this case, you would then get 3 graphs
https://cppp.fr/schedule2021/)
- [Pyperf - Tune the system for benchmarks](
https://pyperf.readthedocs.io/en/latest/system.html)
+- [A totally constexpr standard library - Paul Keir, Joel Falcou et al - Meeting C++ 2022](
+ https://www.youtube.com/watch?v=ekFPm7e__vI)