Skip to content

Commit c392aba

Browse files
committed
[TClingUtils] Use right path separator when parsing ROOT_INCLUDE_PATH
This is important for Windows support.
1 parent 0ac6c9c commit c392aba

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

core/clingutils/src/TClingUtils.cxx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5219,9 +5219,16 @@ void ROOT::TMetaUtils::SetPathsForRelocatability(std::vector<std::string>& cling
52195219

52205220
if (!envInclPath)
52215221
return;
5222+
5223+
#ifdef _WIN32
5224+
constexpr char kPathSep = ';';
5225+
#else
5226+
constexpr char kPathSep = ':';
5227+
#endif
5228+
52225229
std::istringstream envInclPathsStream(envInclPath);
52235230
std::string inclPath;
5224-
while (std::getline(envInclPathsStream, inclPath, ':')) {
5231+
while (std::getline(envInclPathsStream, inclPath, kPathSep)) {
52255232
// Can't use TSystem in here; re-implement TSystem::ExpandPathName().
52265233
replaceEnvVars("ROOT_INCLUDE_PATH", inclPath);
52275234
if (!inclPath.empty()) {

0 commit comments

Comments
 (0)