Skip to content

Commit

Permalink
allow includes of picobench.hpp before PICOBENCH_IMPLEMENT, closes #13
Browse files Browse the repository at this point in the history
  • Loading branch information
iboB committed Mar 5, 2024
1 parent a13c5ad commit a1c1610
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion include/picobench/picobench.hpp
Expand Up @@ -113,7 +113,8 @@
// for the benchmark. You can have initialization/deinitialization code outside
// of the loop and it won't be measured.
//
#pragma once
#if !defined(PICOBENCH_HPP_INCLUDED)
#define PICOBENCH_HPP_INCLUDED

#include <cstdint>
#include <chrono>
Expand Down Expand Up @@ -353,6 +354,8 @@ class global_registry
# define PICOBENCH_IMPLEMENT_MAIN
#endif

#endif // PICOBENCH_HPP_INCLUDED

#if defined(PICOBENCH_IMPLEMENT)

#include <random>
Expand Down
1 change: 0 additions & 1 deletion test/multi_cpp/main.cpp
@@ -1,7 +1,6 @@
#include <doctest/doctest.h>

#define PICOBENCH_IMPLEMENT
#define PICOBENCH_DONT_BIND_TO_ONE_CORE
#include "picobench_configured.hpp"

#include <string>
Expand Down

0 comments on commit a1c1610

Please sign in to comment.