Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ORNL Quantum Computing Institute
xacc
Commits
120f374a
Commit
120f374a
authored
Jan 31, 2018
by
Mccaskey, Alex
Browse files
updating dir search in service registry
Signed-off-by:
Alex McCaskey
<
mccaskeyaj@ornl.gov
>
parent
11f72448
Changes
1
Hide whitespace changes
Inline
Side-by-side
xacc/utils/ServiceRegistry.cpp
View file @
120f374a
...
...
@@ -21,8 +21,7 @@ void ServiceRegistry::initialize() {
const
std
::
string
xaccLibDir
=
std
::
string
(
XACC_INSTALL_DIR
)
+
std
::
string
(
"/lib"
);
XACCLogger
::
instance
()
->
info
(
"XACC Lib Directory: "
+
xaccLibDir
);
for
(
auto
&
entry
:
boost
::
make_iterator_range
(
boost
::
filesystem
::
directory_iterator
(
xaccLibDir
),
{
}))
{
for
(
auto
&
entry
:
boost
::
filesystem
::
directory_iterator
(
xaccLibDir
))
{
XACCLogger
::
instance
()
->
info
(
"TEST: "
+
entry
.
path
().
filename
().
string
());
// We want the gate and aqc bundles that come with XACC
if
(
boost
::
contains
(
entry
.
path
().
filename
().
string
(),
...
...
@@ -40,15 +39,12 @@ void ServiceRegistry::initialize() {
if
(
boost
::
filesystem
::
exists
(
xaccPluginPath
))
{
for
(
boost
::
filesystem
::
directory_iterator
itr
(
xaccPluginPath
);
itr
!=
end_itr
;
++
itr
)
{
if
(
boost
::
filesystem
::
is_directory
(
itr
->
path
()))
{
for
(
auto
&
entry
:
boost
::
make_iterator_range
(
boost
::
filesystem
::
directory_iterator
(
itr
->
path
()),
{
}))
{
XACCLogger
::
instance
()
->
info
(
"Installing 3rd party plugin "
+
entry
.
path
().
string
());
context
.
InstallBundles
(
entry
.
path
().
string
());
for
(
auto
&
entry
:
boost
::
filesystem
::
directory_iterator
(
xaccPluginPath
))
{
auto
p
=
entry
.
path
();
if
(
boost
::
filesystem
::
is_directory
(
p
))
{
for
(
auto
&
subentry
:
boost
::
filesystem
::
directory_iterator
(
p
))
{
XACCLogger
::
instance
()
->
info
(
"Installing 3rd party plugin "
+
subentry
.
path
().
string
());
context
.
InstallBundles
(
subentry
.
path
().
string
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment