stan-dev / stan-dev/math

Building Google benchmark library in math

Open
#2,083 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
839
Forks
220
Avg merge
2d 4h
Merged PRs (30d)
14

Description

Description

The benchmark library has to be built before it can be used.

Assuming BENCHMARK points to the benchmark folder (lib/benchmarks_1.5.1 as of writing), the simplest build directions are:

cd $(BENCHMARK)
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=RELEASE
make

I'm not sure if the separate build directory is required or not -- just stealing these instructions from the perf-math readme.

With that build the required flags are:

includes: -I $(BENCHMARK)/include
library paths: -L $(BENCHMARK)/build/src
library flag: -lbenchmark

I don't think this needs built and included by default.

I assume this should be built as part of make/math-standalone though.

I guess the target to build this should be $(BENCHMARK)/build/src/libbenchmark.a

Current Version:

v3.3.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing perf-math README instructions and the make/math-standalone entry point. Inspect lib/benchmarks_1.5.1 and determine how to produce lib/benchmarks_1.5.1/build/src/libbenchmark.a with the stated CMake and make commands. Done means make/math-standalone builds with the benchmark include, library path, and library flag without making the dependency part of the default build.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.