From a1c16102966532987dcbd3af81b2475c08870eca Mon Sep 17 00:00:00 2001 From: Borislav Stanimirov Date: Tue, 5 Mar 2024 04:09:01 +0000 Subject: [PATCH] allow includes of picobench.hpp before PICOBENCH_IMPLEMENT, closes #13 --- include/picobench/picobench.hpp | 5 ++++- test/multi_cpp/main.cpp | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/picobench/picobench.hpp b/include/picobench/picobench.hpp index 0adaa5c..f88a706 100644 --- a/include/picobench/picobench.hpp +++ b/include/picobench/picobench.hpp @@ -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 #include @@ -353,6 +354,8 @@ class global_registry # define PICOBENCH_IMPLEMENT_MAIN #endif +#endif // PICOBENCH_HPP_INCLUDED + #if defined(PICOBENCH_IMPLEMENT) #include diff --git a/test/multi_cpp/main.cpp b/test/multi_cpp/main.cpp index 095e966..615190a 100644 --- a/test/multi_cpp/main.cpp +++ b/test/multi_cpp/main.cpp @@ -1,7 +1,6 @@ #include #define PICOBENCH_IMPLEMENT -#define PICOBENCH_DONT_BIND_TO_ONE_CORE #include "picobench_configured.hpp" #include