summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/benchmark/README.md
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/benchmark/README.md')
-rw-r--r--3rdparty/benchmark/README.md16
1 files changed, 15 insertions, 1 deletions
diff --git a/3rdparty/benchmark/README.md b/3rdparty/benchmark/README.md
index 1fa7186ec40..21ae478b893 100644
--- a/3rdparty/benchmark/README.md
+++ b/3rdparty/benchmark/README.md
@@ -243,7 +243,7 @@ The `context` attribute contains information about the run in general, including
information about the CPU and the date.
The `benchmarks` attribute contains a list of ever benchmark run. Example json
output looks like:
-```
+``` json
{
"context": {
"date": "2015/03/17-18:40:25",
@@ -290,6 +290,20 @@ name,iterations,real_time,cpu_time,bytes_per_second,items_per_second,label
"BM_SetInsert/1024/10",106365,17238.4,8421.53,4.74973e+06,1.18743e+06,
```
+Debug vs Release
+----------------
+By default, benchmark builds as a debug library. You will see a warning in the output when this is the case. To build it as a release library instead, use:
+
+```
+cmake -DCMAKE_BUILD_TYPE=Release
+```
+
+To enable link-time optimisation, use
+
+```
+cmake -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_ENABLE_LTO=true
+```
+
Linking against the library
---------------------------
When using gcc, it is necessary to link against pthread to avoid runtime exceptions. This is due to how gcc implements std::thread. See [issue #67](https://github.com/google/benchmark/issues/67) for more details.