Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ORNL Quantum Computing Institute
xacc
Commits
9d54f220
Commit
9d54f220
authored
Apr 17, 2018
by
Mccaskey, Alex
Browse files
setting up restclient-cpp to be located on rpath
Signed-off-by:
Alex McCaskey
<
mccaskeyaj@ornl.gov
>
parent
e9abb825
Changes
5
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
9d54f220
...
...
@@ -68,41 +68,10 @@ ExternalProject_Add(cppmicroservices
-DCMAKE_BUILD_TYPE=
${
CMAKE_BUILD_TYPE
}
-DCMAKE_CXX_FLAGS=
${
CMAKE_CXX_FLAGS
}
-DCMAKE_CXX_COMPILER=
${
CMAKE_CXX_COMPILER
}
-DCMAKE_INSTALL_PREFIX=
${
CMAKE_INSTALL_PREFIX
}
-DCMAKE_INSTALL_PREFIX=
${
CMAKE_INSTALL_PREFIX
}
INSTALL_COMMAND
${
CMAKE_MAKE_PROGRAM
}
install
)
# Make it so you don't always have to
# specify openssl dir on mac
#if(APPLE AND NOT OPENSSL_ROOT_DIR)
# if (EXISTS /usr/local/opt/openssl)
# message(STATUS "${BoldGreen}[OSX] Searching for OpenSSL from /usr/local/opt/openssl. Override with -DOPENSSL_ROOT_DIR=...${ColorReset}")
# set(OPENSSL_ROOT_DIR /usr/local/opt/openssl)
# endif()
#elseif(EXISTS /etc/redhat-release AND NOT OPENSSL_ROOT_DIR)
# we are on fedora... check for custom openssl install
# in /usr/local/ssl
# if (EXISTS /usr/local/ssl)
# message(STATUS "${BoldGreen}[Fedora] Searching for OpenSSL from /usr/local/ssl. Override with -DOPENSSL_ROOT_DIR=...${ColorReset}")
# set(OPENSSL_ROOT_DIR /usr/local/ssl)
# endif()
#endif()
#find_package(OpenSSL 1.0.2 REQUIRED)
#message(STATUS "${BoldGreen}Found OpenSSL version ${OPENSSL_VERSION}${ColorReset} at ${OPENSSL_ROOT_DIR}")
#ExternalProject_Add(cpprestsdk
# DEPENDS cppmicroservices
# GIT_REPOSITORY https://github.com/Microsoft/cpprestsdk
# GIT_TAG master
# CONFIGURE_COMMAND ${CMAKE_COMMAND} ../cpprestsdk/Release/ -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
# -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
# -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
# -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
# -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
# -DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR}
# -DBUILD_TESTS=OFF
# INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install
#)
ExternalProject_Add
(
restclient-cpp
DEPENDS cppmicroservices
GIT_REPOSITORY https://github.com/mrtazz/restclient-cpp
...
...
@@ -111,7 +80,6 @@ ExternalProject_Add(restclient-cpp
CONFIGURE_COMMAND sh autogen.sh && sh ./configure CC=
${
CMAKE_C_COMPILER
}
CXX=
${
CMAKE_CXX_COMPILER
}
--prefix=
${
CMAKE_INSTALL_PREFIX
}
INSTALL_COMMAND
${
CMAKE_MAKE_PROGRAM
}
install
)
set
(
CppMicroServices_INCLUDE_DIR
${
CMAKE_INSTALL_PREFIX
}
/include/cppmicroservices3
)
set
(
CppMicroServices_LIBRARY_DIR
${
CMAKE_INSTALL_PREFIX
}
/lib
)
...
...
python/CMakeLists.txt
View file @
9d54f220
...
...
@@ -50,6 +50,12 @@ link_directories(${Boost_LIBRARY_DIR})
#endif()
target_link_libraries
(
pyxacc xacc xacc-quantum-gate xacc-quantum-aqc CppMicroServices
${
Boost_LIBRARIES
}
restclient-cpp
)
#cpprest ${OPENSSL_LIBRARIES})
if
(
APPLE
)
add_custom_command
(
TARGET pyxacc
POST_BUILD COMMAND
${
CMAKE_INSTALL_NAME_TOOL
}
-change
"
${
CMAKE_INSTALL_PREFIX
}
/lib/librestclient-cpp.1.dylib"
"@rpath/librestclient-cpp.1.dylib"
$<TARGET_FILE:pyxacc>
)
endif
()
if
(
APPLE
)
set_target_properties
(
pyxacc PROPERTIES INSTALL_RPATH
"@loader_path/lib"
)
set_target_properties
(
pyxacc PROPERTIES LINK_FLAGS
"-undefined dynamic_lookup"
)
...
...
quantum/aqc/CMakeLists.txt
View file @
9d54f220
...
...
@@ -62,6 +62,12 @@ if (NOT cppus_has_d_suffix)
endif
()
target_link_libraries
(
${
LIBRARY_NAME
}
${
Boost_LIBRARIES
}
${
CppUsLib
}
xacc restclient-cpp
)
#cpprest ${OPENSSL_LIBRARIES})
if
(
APPLE
)
add_custom_command
(
TARGET xacc-quantum-aqc
POST_BUILD COMMAND
${
CMAKE_INSTALL_NAME_TOOL
}
-change
"
${
CMAKE_INSTALL_PREFIX
}
/lib/librestclient-cpp.1.dylib"
"@rpath/librestclient-cpp.1.dylib"
$<TARGET_FILE:xacc-quantum-aqc>
)
endif
()
add_subdirectory
(
ir
)
add_subdirectory
(
compiler
)
...
...
quantum/gate/CMakeLists.txt
View file @
9d54f220
...
...
@@ -66,6 +66,12 @@ if (NOT cppus_has_d_suffix)
endif
()
target_link_libraries
(
${
LIBRARY_NAME
}
${
Boost_LIBRARIES
}
xacc
${
CppUsLib
}
restclient-cpp
)
#cpprest ${OPENSSL_LIBRARIES})
if
(
APPLE
)
add_custom_command
(
TARGET xacc-quantum-gate
POST_BUILD COMMAND
${
CMAKE_INSTALL_NAME_TOOL
}
-change
"
${
CMAKE_INSTALL_PREFIX
}
/lib/librestclient-cpp.1.dylib"
"@rpath/librestclient-cpp.1.dylib"
$<TARGET_FILE:xacc-quantum-gate>
)
endif
()
add_subdirectory
(
compiler
)
add_subdirectory
(
ir
)
add_subdirectory
(
utils
)
...
...
xacc/CMakeLists.txt
View file @
9d54f220
...
...
@@ -72,21 +72,13 @@ if (NOT cppus_has_d_suffix)
set
(
CppUsLib CppMicroServices
)
endif
()
#if (APPLE)
# set(OPENSSL_LIBRARIES "${OPENSSL_LIBRARIES};${OPENSSL_CRYPTO_LIBRARY}")
#endif()
#if(PythonLibs_FOUND)
# target_link_libraries(${LIBRARY_NAME} ${PYTHON_LIBRARY} ${Boost_LIBRARIES} ${CppUsLib} restclient-cpp)
#else()
target_link_libraries
(
${
LIBRARY_NAME
}
${
Boost_LIBRARIES
}
${
CppUsLib
}
restclient-cpp
)
#endif()
target_link_libraries
(
${
LIBRARY_NAME
}
${
Boost_LIBRARIES
}
${
CppUsLib
}
${
CMAKE_INSTALL_PREFIX
}
/lib/librestclient-cpp.dylib
)
#
if(APPLE)
# set_target_properties(xacc PROPERTIES LDFLAGS "-undefined dynamic_lookup")
#else()
#
set_target_properties(xacc PROPERTIES LDFLAGS "-shared"
)
#
endif()
if
(
APPLE
)
add_custom_command
(
TARGET xacc
POST_BUILD COMMAND
${
CMAKE_INSTALL_NAME_TOOL
}
-change
"
${
CMAKE_INSTALL_PREFIX
}
/lib/librestclient-cpp.1.dylib"
"@rpath/librestclient-cpp.1.dylib"
$<TARGET_FILE:xacc>
)
endif
()
# Get the test files
file
(
GLOB test_files utils/tests/*Tester.cpp accelerator/tests/*Tester.cpp
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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