Skip to content

Commit d1f280e

Browse files
authored
Fix ompt issues (#591)
* Fix OMPT directory duplicate * Avoid duplicate options in ConfigManager
1 parent 5960145 commit d1f280e

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/caliper/ConfigManager.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,15 @@ struct ConfigManager::Options::OptionsImpl
632632
}
633633
}
634634

635-
enabled_options = std::move(vec);
635+
// make sure there are no duplicates, but keep entries in input order
636+
std::vector<std::string> ret;
637+
ret.reserve(vec.size());
638+
for (auto it = vec.begin(); it != vec.end(); ++it) {
639+
if (std::find(ret.begin(), ret.end(), *it) == ret.end())
640+
ret.emplace_back(std::move(*it));
641+
}
642+
643+
enabled_options = std::move(ret);
636644
}
637645

638646
OptionsImpl(const OptionSpec& s, const arglist_t& a)

src/services/CMakeLists.txt

-5
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,6 @@ if (CALIPER_HAVE_LIBDW)
8787
add_subdirectory(symbollookup)
8888
endif()
8989
add_subdirectory(trace)
90-
# add_subdirectory(pattern)
91-
if (CALIPER_HAVE_OMPT)
92-
add_subdirectory(ompt)
93-
endif()
94-
9590
if (CALIPER_HAVE_OMPT)
9691
add_subdirectory(ompt)
9792
endif()

0 commit comments

Comments
 (0)