Skip to content

Commit 5b28f57

Browse files
committed
CommonUtils: Don't use ROOT TGrid if we build standalone benchmark
1 parent 76543b9 commit 5b28f57

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

Common/Utils/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ o2_add_library(CommonUtils
2626
src/DebugStreamer.cxx
2727
src/DLLoaderBase.cxx
2828
PUBLIC_LINK_LIBRARIES ROOT::Hist ROOT::Tree Boost::iostreams O2::CommonDataFormat O2::Headers
29-
FairLogger::FairLogger O2::MathUtils TBB::tbb)
29+
FairLogger::FairLogger O2::MathUtils TBB::tbb O2::GPUCommon)
3030

3131
o2_target_root_dictionary(CommonUtils
3232
HEADERS include/CommonUtils/TreeStream.h

Common/Utils/include/CommonUtils/StringUtils.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
#include <sstream>
2121
#include <vector>
2222
#include <algorithm>
23-
#include <fmt/format.h>
24-
#include <Rtypes.h>
23+
#include "GPUCommonRtypes.h"
2524

2625
namespace o2
2726
{

Common/Utils/src/StringUtils.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
#include "CommonUtils/StringUtils.h"
1313
#include <cstdlib>
1414
#include <filesystem>
15+
#ifndef GPUCA_STANDALONE
1516
#include <TGrid.h>
17+
#include <fmt/format.h>
18+
#endif
1619
#include <unistd.h>
1720

1821
using namespace o2::utils;
@@ -77,6 +80,7 @@ std::string Str::getFullPath(const std::string_view p)
7780
return std::filesystem::canonical(std::string{p}).string();
7881
}
7982

83+
#ifndef GPUCA_STANDALONE
8084
std::string Str::rectifyDirectory(const std::string_view p)
8185
{
8286
std::string dir(p);
@@ -104,6 +108,7 @@ std::string Str::rectifyDirectory(const std::string_view p)
104108
}
105109
return dir;
106110
}
111+
#endif
107112

108113
// Create unique non-existing path name starting with prefix. Loose equivalent of boost::filesystem::unique_path()
109114
// The prefix can be either existing directory or just a string to add in front of the random part

GPU/GPUTracking/DataTypes/CalibdEdxTrackTopologyPol.cxx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,14 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#ifndef GPUCA_NO_VC
12+
#ifndef GPUCA_STANDALONE
1313
#include "Rtypes.h"
14+
#include "TFile.h"
1415
#endif
1516
#include "CalibdEdxTrackTopologyPol.h"
1617

1718
#include <cstddef>
1819
#include <string_view>
19-
#if !defined(GPUCA_STANDALONE)
20-
#include "TFile.h"
21-
#endif
2220

2321
using namespace o2::tpc;
2422

0 commit comments

Comments
 (0)