Commit e7715fe5 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

got build working with cpr



Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent 47b497ed
......@@ -17,8 +17,8 @@ set(CMAKE_CXX_STANDARD 11)
message(STATUS "C++ version ${CXX_STANDARD} configured.")
# Make sure all build libraries have reference to their dependents
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
#set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
#set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
......@@ -98,10 +98,10 @@ ExternalProject_Add(cppmicroservices
GIT_REPOSITORY https://github.com/cppmicroservices/cppmicroservices
GIT_TAG v3.1.0
CMAKE_ARGS -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-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_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install
)
......@@ -113,16 +113,17 @@ add_subdirectory(tpls/cpr)
include_directories(${CPR_INCLUDE_DIRS})
include_directories(${CMAKE_INSTALL_PREFIX}/include/cppmicroservices3)
include_directories(${CMAKE_INSTALL_PREFIX}/include/boost)
include_directories(${CMAKE_INSTALL_PREFIX}/include)
include_directories(${CMAKE_SOURCE_DIR}/tpls/spdlog)
include_directories(${CMAKE_SOURCE_DIR}/tpls/eigen)
link_directories(${CMAKE_INSTALL_PREFIX}/lib)
message(STATUS "CPR LIBS ${CPR_LIBRARIES}")
ExternalProject_Add(boost
DEPENDS cppmicroservices cpr
URL https://downloads.sourceforge.net/project/boost/boost/1.61.0/boost_1_61_0.tar.gz
UPDATE_COMMAND ./bootstrap.sh --prefix=${CMAKE_INSTALL_PREFIX} --without-libraries=python,mpi,atomic,container,context,coroutine,coroutine2,date_time,exception,iostreams,locale,log,math,metaparse,random,serialization,signals,thread,type_erasure,wave
DEPENDS cpr cppmicroservices
URL https://downloads.sourceforge.net/project/boost/boost/1.63.0/boost_1_63_0.tar.gz
UPDATE_COMMAND ./bootstrap.sh --prefix=${CMAKE_INSTALL_PREFIX} --without-libraries=python,mpi,container,context,coroutine,coroutine2,exception,iostreams,locale,log,math,metaparse,serialization,signals,type_erasure,wave,atomic,date_time,random,thread
CONFIGURE_COMMAND ""
BUILD_COMMAND ./b2
INSTALL_COMMAND ./b2 install
......@@ -136,111 +137,42 @@ ExternalProject_Add(boost
set(BOOST_ROOT ${CMAKE_INSTALL_PREFIX})
add_subdirectory(xacc)
add_subdirectory(quantum)
add_subdirectory(python)
#ExternalProject_Add(xacc-core
# DEPENDS cppmicroservices restclient-cpp boost
# SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xacc
# CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
# -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
# -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
# -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
# -DBOOST_ROOT=${BOOST_ROOT}
# -DXACC_ROOT=${CMAKE_CURRENT_SOURCE_DIR}
# -DCPPUS_INCLUDE_DIR=${CppMicroServices_INCLUDE_DIR}
# -DCPPUS_LIBRARY_DIR=${CppMicroServices_LIBRARY_DIR}
# -DCppRSDK_INCLUDE_DIR=${CppRSDK_INCLUDE_DIR}
#-DXACC_HAS_PYTHON=${PYTHONLIBS_FOUND}
# -DXACC_PYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}
# -DXACC_PYTHON_LIBRARIES=${PYTHON_LIBRARIES}
# -DPYBIND11_DIR=${CMAKE_SOURCE_DIR}/python/pybind11
# -DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR}
# -DOPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR}
# -DOPENSSL_LIBRARIES=${OPENSSL_LIBRARIES}
# -DOPENSSL_CRYPTO_LIBRARY=${OPENSSL_CRYPTO_LIBRARY}
# CMAKE_CACHE_ARGS -DCMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH}
# BUILD_ALWAYS 1
# INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install # DESTDIR=${CMAKE_BINARY_DIR}/stage
# TEST_BEFORE_INSTALL 1
# )
#else()
#ExternalProject_Add(xacc-core
# DEPENDS cppmicroservices restclient-cpp
# SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xacc
# CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
# -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
# -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
# -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
# -DBOOST_ROOT=${BOOST_ROOT}
# -DXACC_ROOT=${CMAKE_CURRENT_SOURCE_DIR}
# -DCPPUS_INCLUDE_DIR=${CppMicroServices_INCLUDE_DIR}
# -DCPPUS_LIBRARY_DIR=${CppMicroServices_LIBRARY_DIR}
# -DCppRSDK_INCLUDE_DIR=${CppRSDK_INCLUDE_DIR}
#-DXACC_HAS_PYTHON=${PYTHONLIBS_FOUND}
# -DXACC_PYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}
# -DXACC_PYTHON_LIBRARIES=${PYTHON_LIBRARIES}
# -DPYBIND11_DIR=${CMAKE_SOURCE_DIR}/python/pybind11
# -DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR}
# -DOPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR}
# -DOPENSSL_LIBRARIES=${OPENSSL_LIBRARIES}
# -DOPENSSL_CRYPTO_LIBRARY=${OPENSSL_CRYPTO_LIBRARY}
# CMAKE_CACHE_ARGS -DCMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH}
# BUILD_ALWAYS 1
# INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install # DESTDIR=${CMAKE_BINARY_DIR}/stage
# TEST_BEFORE_INSTALL 1
# )
#endif()
#ExternalProject_Add(xacc-quantum
# DEPENDS xacc-core
# SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/quantum
# CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
# -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
# -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
# -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
# -DXACC_ROOT=${CMAKE_CURRENT_SOURCE_DIR}
# -DBOOST_ROOT=${BOOST_ROOT}
# -DCPPUS_INCLUDE_DIR=${CppMicroServices_INCLUDE_DIR}
# -DCPPUS_LIBRARY_DIR=${CppMicroServices_LIBRARY_DIR}
# -DXACC_INCLUDE_DIR=${CMAKE_INSTALL_PREFIX}/include/xacc
# -DXACC_LIBRARY_DIR=${CMAKE_INSTALL_PREFIX}/lib
# -DCppRSDK_INCLUDE_DIR=${CppRSDK_INCLUDE_DIR}
# -DOPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR}
# -DOPENSSL_LIBRARIES=${OPENSSL_LIBRARIES}
# -DOPENSSL_CRYPTO_LIBRARY=${OPENSSL_CRYPTO_LIBRARY}
# CMAKE_CACHE_ARGS -DCMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH}
# BUILD_ALWAYS 1
# INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install #DESTDIR=${CMAKE_BINARY_DIR}/stage
# TEST_AFTER_INSTALL 1
# )
#find_package(PythonLibs)
#if(PYTHONLIBS_FOUND)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXACC_HAS_PYTHON")
#ExternalProject_Add(xacc-python
# DEPENDS xacc-core xacc-quantum
# SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/python
# CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
# -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
# -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
# -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
# -DXACC_ROOT=${CMAKE_CURRENT_SOURCE_DIR}
# -DBOOST_ROOT=${BOOST_ROOT}
# -DCPPUS_INCLUDE_DIR=${CppMicroServices_INCLUDE_DIR}
# -DCPPUS_LIBRARY_DIR=${CppMicroServices_LIBRARY_DIR}
# -DXACC_INCLUDE_DIR=${CMAKE_INSTALL_PREFIX}/include #${XACC_INCLUDE_DIR}
# -DXACC_LIBRARY_DIR=${CMAKE_INSTALL_PREFIX}/lib #${XACC_LIBRARY_DIR}
# -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
# -DFROM_SETUP_PY=${FROM_SETUP_PY}
# -DXACC_PYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}
# CMAKE_CACHE_ARGS -DCMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH}
# BUILD_ALWAYS 1
# INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install #DESTDIR=${CMAKE_BINARY_DIR}/stage
# TEST_AFTER_INSTALL 1
# )
#endif()
ExternalProject_Add(xacc-quantum
DEPENDS xacc
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/quantum
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-DXACC_ROOT=${CMAKE_CURRENT_SOURCE_DIR}
-DXACC_BINARY_DIR=${CMAKE_BINARY_DIR}
CMAKE_CACHE_ARGS -DCMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH}
BUILD_ALWAYS 1
INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install #DESTDIR=${CMAKE_BINARY_DIR}/stage
TEST_AFTER_INSTALL 1
)
find_package(PythonLibs)
if(PYTHONLIBS_FOUND)
ExternalProject_Add(xacc-python
DEPENDS xacc-quantum
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/python
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-DXACC_ROOT=${CMAKE_CURRENT_SOURCE_DIR}
-DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
-DXACC_BINARY_DIR=${CMAKE_BINARY_DIR}
-DFROM_SETUP_PY=${FROM_SETUP_PY}
-DXACC_PYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}
CMAKE_CACHE_ARGS -DCMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH}
BUILD_ALWAYS 1
INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install #DESTDIR=${CMAKE_BINARY_DIR}/stage
TEST_AFTER_INSTALL 1
)
endif()
# Install the config file for external projects to use
# This is cool, users just add find_package(XACC REQUIRED) to
......
find_package(PythonLibs REQUIRED)
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
project(xacc-python LANGUAGES CXX)
set(CppMicroServices_DIR "${CMAKE_INSTALL_PREFIX}/share/cppmicroservices3/cmake")
set(CMAKE_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 11)
# Modify our CMAKE_MODULE_PATH
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CppMicroServices_DIR}")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${XACC_ROOT}/cmake/Modules")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_INSTALL_PREFIX}/share/cppmicroservices3/cmake")
include(CppMicroServicesConfig)
include(tests)
find_package(PythonLibs REQUIRED)
set(BOOST_ROOT ${CMAKE_INSTALL_PREFIX})
find_package(Boost COMPONENTS system program_options filesystem chrono regex graph REQUIRED)
include_directories(${CMAKE_SOURCE_DIR}/xacc)
include_directories(${CMAKE_SOURCE_DIR}/quantum/gate)
include_directories(${CMAKE_SOURCE_DIR}/quantum/aqc)
include_directories(${XACC_ROOT}/xacc)
include_directories(${XACC_ROOT}/quantum/gate)
include_directories(${XACC_ROOT}/quantum/aqc)
include_directories(${CMAKE_INSTALL_PREFIX}/include)
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/xacc)
include_directories(${CMAKE_SOURCE_DIR}/xacc/ir)
include_directories(${CMAKE_SOURCE_DIR}/xacc/compiler)
include_directories(${CMAKE_SOURCE_DIR}/xacc/program)
include_directories(${CMAKE_SOURCE_DIR}/xacc/accelerator)
include_directories(${CMAKE_SOURCE_DIR}/xacc/utils)
include_directories(${CMAKE_SOURCE_DIR}/tpls/rapidjson/include)
include_directories(${CMAKE_SOURCE_DIR}/tpls/exprtk)
include_directories(${CMAKE_SOURCE_DIR}/tpls/spdlog)
include_directories(${CMAKE_SOURCE_DIR}/tpls/eigen)
include_directories(${CMAKE_SOURCE_DIR}/quantum/gate/ir)
include_directories(${CMAKE_SOURCE_DIR}/quantum/gate/ir/instructions)
include_directories(${CMAKE_SOURCE_DIR}/quantum/gate/utils)
include_directories(${CMAKE_INSTALL_PREFIX}/include/cppmicroservices3)
include_directories(${XACC_BINARY_DIR})
include_directories(${XACC_ROOT}/xacc/ir)
include_directories(${XACC_ROOT}/xacc/compiler)
include_directories(${XACC_ROOT}/xacc/program)
include_directories(${XACC_ROOT}/xacc/accelerator)
include_directories(${XACC_ROOT}/xacc/utils)
include_directories(${XACC_ROOT}/tpls/rapidjson/include)
include_directories(${XACC_ROOT}/tpls/exprtk)
include_directories(${XACC_ROOT}/tpls/spdlog)
include_directories(${XACC_ROOT}/tpls/eigen)
include_directories(${XACC_ROOT}/quantum/gate/ir)
include_directories(${XACC_ROOT}/quantum/gate/ir/instructions)
include_directories(${XACC_ROOT}/quantum/gate/utils)
link_directories(${CMAKE_INSTALL_PREFIX}/lib)
include_directories(${PYTHON_INCLUDE_DIR})
include_directories(${CMAKE_SOURCE_DIR}/tpls/pybind11/include)
include_directories(${XACC_ROOT}/tpls/pybind11/include)
link_directories(${XACC_BINARY_DIR}/xacc)
link_directories(${XACC_BINARY_DIR}/lib)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing -O2 -g -pipe -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wformat -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv")
if(APPLE)
......@@ -42,7 +50,6 @@ if(APPLE)
endif(APPLE)
add_library(pyxacc SHARED xacc-py.cpp)
add_dependencies(pyxacc xacc xacc-quantum-gate xacc-quantum-aqc)
set_target_properties(pyxacc PROPERTIES PREFIX "")
set(CppUsLib CppMicroServicesd)
......@@ -51,7 +58,7 @@ if (NOT cppus_has_d_suffix)
set(CppUsLib CppMicroServices)
endif()
target_link_libraries(pyxacc ${CppUsLib} xacc xacc-quantum-gate ${Boost_LIBRARIES} cpr) #xacc xacc-quantum-gate xacc-quantum-aqc CppMicroServices ${Boost_LIBRARIES} restclient-cpp) #cpprest ${OPENSSL_LIBRARIES})
target_link_libraries(pyxacc ${CppUsLib} xacc xacc-quantum-gate ${Boost_LIBRARIES} cpr curl) #xacc xacc-quantum-gate xacc-quantum-aqc CppMicroServices ${Boost_LIBRARIES} restclient-cpp) #cpprest ${OPENSSL_LIBRARIES})
if(APPLE)
set_target_properties(pyxacc PROPERTIES INSTALL_RPATH "@loader_path/lib")
......
......@@ -10,26 +10,40 @@
# Contributors:
# Alexander J. McCaskey - initial API and implementation
# *******************************************************************************/
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
project(xacc-quantum LANGUAGES CXX)
set(CMAKE_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${XACC_ROOT}/cmake/Modules")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_INSTALL_PREFIX}/share/cppmicroservices3/cmake")
include(CppMicroServicesConfig)
include(tests)
#set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
#set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(BOOST_ROOT ${CMAKE_INSTALL_PREFIX})
find_package(Boost COMPONENTS system program_options regex filesystem chrono graph REQUIRED)
include_directories(${CMAKE_INSTALL_PREFIX}/include)
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/xacc)
include_directories(${CMAKE_SOURCE_DIR}/xacc/ir)
include_directories(${CMAKE_SOURCE_DIR}/xacc/compiler)
include_directories(${CMAKE_SOURCE_DIR}/xacc/program)
include_directories(${CMAKE_SOURCE_DIR}/xacc/accelerator)
include_directories(${CMAKE_SOURCE_DIR}/xacc/utils)
include_directories(${CMAKE_SOURCE_DIR}/tpls/rapidjson/include)
include_directories(${CMAKE_SOURCE_DIR}/tpls/exprtk)
include_directories(${CMAKE_SOURCE_DIR}/tpls/spdlog)
include_directories(${CMAKE_SOURCE_DIR}/tpls/eigen)
include_directories(${CMAKE_INSTALL_PREFIX}/include/cppmicroservices3)
include_directories(${XACC_BINARY_DIR})
include_directories(${XACC_ROOT}/xacc)
include_directories(${XACC_ROOT}/xacc/ir)
include_directories(${XACC_ROOT}/xacc/compiler)
include_directories(${XACC_ROOT}/xacc/program)
include_directories(${XACC_ROOT}/xacc/accelerator)
include_directories(${XACC_ROOT}/xacc/utils)
include_directories(${XACC_ROOT}/tpls/rapidjson/include)
include_directories(${XACC_ROOT}/tpls/exprtk)
include_directories(${XACC_ROOT}/tpls/spdlog)
include_directories(${XACC_ROOT}/tpls/eigen)
link_directories(${CMAKE_INSTALL_PREFIX}/lib)
link_directories(${XACC_BINARY_DIR}/xacc)
link_directories(${XACC_BINARY_DIR}/lib)
add_subdirectory(gate)
add_subdirectory(aqc)
......@@ -27,7 +27,6 @@ usFunctionGenerateBundleInit(TARGET ${LIBRARY_NAME} OUT SRC)
#----
add_library(${LIBRARY_NAME} SHARED ${SRC})
add_dependencies(${LIBRARY_NAME} xacc)
set(_bundle_name xacc_quantum_aqc)
set_target_properties(${LIBRARY_NAME} PROPERTIES
......@@ -58,6 +57,8 @@ find_library(cppus_has_d_suffix CppMicroServicesd)
if (NOT cppus_has_d_suffix)
set(CppUsLib CppMicroServices)
endif()
target_link_libraries(${LIBRARY_NAME} ${CppUsLib})
#target_link_libraries(${LIBRARY_NAME} ${CppUsLib}) #${Boost_LIBRARIES} ${CppUsLib} xacc restclient-cpp) #cpprest ${OPENSSL_LIBRARIES})
if(APPLE)
......
......@@ -12,4 +12,4 @@
# *******************************************************************************/
# Gather tests
file (GLOB test_files tests/*.cpp)
add_tests("${test_files}" "${CMAKE_CURRENT_SOURCE_DIR}" "${LIBRARY_NAME};${Boost_LIBRARIES};dl;pthread;xacc-quantum-aqc;xacc;${CppUsLib};cpr")
add_tests("${test_files}" "${CMAKE_CURRENT_SOURCE_DIR}" "${LIBRARY_NAME};${Boost_LIBRARIES};dl;pthread;xacc-quantum-aqc;xacc;${CppUsLib};cpr;curl")
......@@ -12,4 +12,4 @@
# *******************************************************************************/
# Gather tests
file (GLOB test_files tests/*.cpp)
add_tests("${test_files}" "${CMAKE_CURRENT_SOURCE_DIR}" "${Boost_LIBRARIES};xacc;xacc-quantum-aqc;${CppUsLib};cpr")
add_tests("${test_files}" "${CMAKE_CURRENT_SOURCE_DIR}" "xacc;${Boost_LIBRARIES};xacc-quantum-aqc;${CppUsLib};cpr;curl")
......@@ -29,7 +29,6 @@ usFunctionGetResourceSource(TARGET ${LIBRARY_NAME} OUT SRC)
usFunctionGenerateBundleInit(TARGET ${LIBRARY_NAME} OUT SRC)
add_library(${LIBRARY_NAME} SHARED ${SRC})
add_dependencies(${LIBRARY_NAME} xacc)
set(_bundle_name xacc_quantum_gate)
set_target_properties(${LIBRARY_NAME} PROPERTIES
......@@ -61,6 +60,7 @@ if (NOT cppus_has_d_suffix)
set(CppUsLib CppMicroServices)
endif()
target_link_libraries(${LIBRARY_NAME} ${CppUsLib})
#target_link_libraries(${LIBRARY_NAME} ${CppUsLib}) #${Boost_LIBRARIES} xacc ${CppUsLib} restclient-cpp) #cpprest ${OPENSSL_LIBRARIES})
if(APPLE)
......
......@@ -12,4 +12,4 @@
# *******************************************************************************/
# Gather tests
file (GLOB test_files tests/*.cpp)
add_tests("${test_files}" "${CMAKE_CURRENT_SOURCE_DIR}" "${Boost_LIBRARIES};xacc-quantum-gate;xacc;${CppUsLib};cpr")
add_tests("${test_files}" "${CMAKE_CURRENT_SOURCE_DIR}" "${Boost_LIBRARIES};xacc-quantum-gate;xacc;${CppUsLib};cpr;curl")
......@@ -13,4 +13,4 @@
# Gather tests
file (GLOB test_files tests/*.cpp)
add_tests("${test_files}" "${CMAKE_CURRENT_SOURCE_DIR}" "${LIBRARY_NAME};${Boost_LIBRARIES};xacc;xacc-quantum-gate;${CppUsLib};cpr")
add_tests("${test_files}" "${CMAKE_CURRENT_SOURCE_DIR}" "${LIBRARY_NAME};${Boost_LIBRARIES};xacc;xacc-quantum-gate;${CppUsLib};cpr;curl")
......@@ -14,5 +14,5 @@ include_directories(${CMAKE_SOURCE_DIR}/tpls/eigen)
# Gather tests
file (GLOB test_files tests/*.cpp)
add_tests("${test_files}" "${CMAKE_CURRENT_SOURCE_DIR}" "${Boost_LIBRARIES};xacc;xacc-quantum-gate;${CppUsLib};cpr")
add_tests("${test_files}" "${CMAKE_CURRENT_SOURCE_DIR}" "${Boost_LIBRARIES};xacc;xacc-quantum-gate;${CppUsLib};cpr;curl")
......@@ -67,16 +67,20 @@ def mkdir_p(path):
exit()
def initialize():
xaccHome = os.environ['HOME']+'/.xacc'
if not os.path.exists(xaccHome):
os.makedirs(xaccHome)
try:
file = open(os.environ['HOME']+'/.xacc/.internal_plugins', 'r')
file = open(xaccHome+'/.internal_plugins', 'r')
contents = file.read()
except IOError:
file = open(os.environ['HOME']+'/.xacc/.internal_plugins', 'w')
file = open(xaccHome+'/.internal_plugins', 'w')
contents = ''
file.close()
file = open(os.environ['HOME']+'/.xacc/.internal_plugins', 'w')
file = open(xaccHome+'/.internal_plugins', 'w')
xaccLocation = os.path.dirname(os.path.realpath(xacc.__file__))
if platform.system() == "Darwin":
......
......@@ -50,7 +50,7 @@ file (GLOB SRCS
#link_directories(${CMAKE_INSTALL_PREFIX}/lib)
add_library(xacc SHARED ${SRCS})
add_dependencies(xacc boost cppmicroservices cpr)
add_dependencies(xacc boost cpr)
if(APPLE)
set_target_properties(xacc PROPERTIES INSTALL_RPATH "@loader_path")
......@@ -68,6 +68,7 @@ find_library(cppus_has_d_suffix CppMicroServicesd)
if (NOT cppus_has_d_suffix)
set(CppUsLib CppMicroServices)
endif()
target_link_libraries(xacc ${CppUsLib})
# Add the tests
add_tests("${test_files}" "${CMAKE_CURRENT_SOURCE_DIR}/utils" "${Boost_LIBRARIES};xacc;${CppUsLib};boost_program_options;boost_unit_test_framework;boost_system;cpr;boost_filesystem;boost_graph")
......
......@@ -13,7 +13,6 @@
#ifndef XACC_UTILS_UTILS_HPP_
#define XACC_UTILS_UTILS_HPP_
#include <boost/bind.hpp>
#include <boost/tokenizer.hpp>
#include "Singleton.hpp"
#include "RuntimeOptions.hpp"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment