Commit 9e1b3fa0 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

Updating build to only not build RigettiAcc and DWAcc when OpenSSL not found....

Updating build to only not build RigettiAcc and DWAcc when OpenSSL not found. Set up build to indicate you do not have OpenSSL if you don't
parent 90539eb8
......@@ -29,31 +29,26 @@
#
#**********************************************************************************/
find_package(OpenSSL)
if (OPENSSL_FOUND)
include_directories(${CMAKE_SOURCE_DIR}/quantum/aqc/ir)
include_directories(${CMAKE_SOURCE_DIR}/quantum/aqc/compiler)
include_directories(${CMAKE_SOURCE_DIR}/quantum/aqc/compiler/default)
include_directories(${CMAKE_SOURCE_DIR}/quantum/aqc/accelerator)
include_directories(${CMAKE_SOURCE_DIR}/quantum/aqc/ir)
include_directories(${CMAKE_SOURCE_DIR}/quantum/aqc/compiler)
include_directories(${CMAKE_SOURCE_DIR}/quantum/aqc/compiler/default)
include_directories(${CMAKE_SOURCE_DIR}/quantum/aqc/accelerator)
include_directories(${CMAKE_SOURCE_DIR}/tpls/fire/util)
include_directories(${CMAKE_SOURCE_DIR}/tpls/fire/tpls/simpleweb)
include_directories(${CMAKE_SOURCE_DIR}/tpls/rapidjson/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/accelerator)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/compiler)
include_directories(${CMAKE_SOURCE_DIR}/tpls/rapidjson/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/accelerator)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/compiler)
include_directories(${CMAKE_SOURCE_DIR}/tpls/fire/util)
include_directories(${CMAKE_SOURCE_DIR}/tpls/fire/tpls/simpleweb)
set (PACKAGE_NAME "XACC D-Wave Support")
set (PACKAGE_DESCIPTION "Extensions to XACC to work with the D-Wave QPU")
set (PACKAGE_NAME "XACC D-Wave Support")
set (PACKAGE_DESCIPTION "Extensions to XACC to work with the D-Wave QPU")
add_subdirectory(accelerator)
add_subdirectory(compiler)
add_subdirectory(examples)
add_subdirectory(accelerator)
add_subdirectory(compiler)
add_subdirectory(examples)
# Gather tests
file (GLOB test_files tests/*.cpp)
add_tests("${test_files}" "${CMAKE_CURRENT_SOURCE_DIR}" "xacc-dwave-accelerator;xacc-dwave-qmicompiler;dl;pthread;CppMicroServices")
endif()
# Gather tests
file (GLOB test_files tests/*.cpp)
add_tests("${test_files}" "${CMAKE_CURRENT_SOURCE_DIR}" "xacc-dwave-accelerator;xacc-dwave-qmicompiler;dl;pthread;CppMicroServices")
......@@ -29,45 +29,50 @@
#
#**********************************************************************************/
set (PACKAGE_NAME "D-Wave XACC Accelerator")
set (PACKAGE_DESCIPTION "D-Wave XACC Accelerator Bundle")
set (LIBRARY_NAME xacc-dwave-accelerator)
find_package(OpenSSL)
file (GLOB_RECURSE HEADERS *.hpp)
file (GLOB SRC *.cpp)
if (OPENSSL_FOUND)
set (PACKAGE_NAME "D-Wave XACC Accelerator")
set (PACKAGE_DESCIPTION "D-Wave XACC Accelerator Bundle")
set (LIBRARY_NAME xacc-dwave-accelerator)
# Set up dependencies to resources to track changes
usFunctionGetResourceSource(TARGET ${LIBRARY_NAME} OUT SRC)
# Generate bundle initialization code
usFunctionGenerateBundleInit(TARGET ${LIBRARY_NAME} OUT SRC)
file (GLOB_RECURSE HEADERS *.hpp)
file (GLOB SRC *.cpp)
add_library(${LIBRARY_NAME} SHARED ${SRC})
# Set up dependencies to resources to track changes
usFunctionGetResourceSource(TARGET ${LIBRARY_NAME} OUT SRC)
# Generate bundle initialization code
usFunctionGenerateBundleInit(TARGET ${LIBRARY_NAME} OUT SRC)
set(_bundle_name xacc_dwave_accelerator)
add_library(${LIBRARY_NAME} SHARED ${SRC})
set_target_properties(${LIBRARY_NAME} PROPERTIES
# This is required for every bundle
COMPILE_DEFINITIONS US_BUNDLE_NAME=${_bundle_name}
# This is for convenience, used by other CMake functions
US_BUNDLE_NAME ${_bundle_name}
)
set(_bundle_name xacc_dwave_accelerator)
if(BUILD_SHARED_LIBS)
set_target_properties(${LIBRARY_NAME} PROPERTIES
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN 1
)
endif()
set_target_properties(${LIBRARY_NAME} PROPERTIES
# This is required for every bundle
COMPILE_DEFINITIONS US_BUNDLE_NAME=${_bundle_name}
# This is for convenience, used by other CMake functions
US_BUNDLE_NAME ${_bundle_name}
)
# Embed meta-data from a manifest.json file
usFunctionEmbedResources(TARGET ${LIBRARY_NAME}
WORKING_DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}
FILES
manifest.json
)
if(BUILD_SHARED_LIBS)
set_target_properties(${LIBRARY_NAME} PROPERTIES
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN 1
)
endif()
target_link_libraries(${LIBRARY_NAME} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} CppMicroServices xacc-quantum-aqc)
# Embed meta-data from a manifest.json file
usFunctionEmbedResources(TARGET ${LIBRARY_NAME}
WORKING_DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}
FILES
manifest.json
)
install(TARGETS ${LIBRARY_NAME} DESTINATION lib/plugins/accelerators)
target_link_libraries(${LIBRARY_NAME} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} CppMicroServices xacc-quantum-aqc)
install(TARGETS ${LIBRARY_NAME} DESTINATION lib/plugins/accelerators)
else()
message(STATUS "OpenSSL not found, cannot include D-Wave Accelerator plugin")
endif()
......@@ -29,36 +29,31 @@
#
#**********************************************************************************/
find_package(OpenSSL)
include_directories(${CMAKE_SOURCE_DIR}/tpls/rapidjson/include)
if (OPENSSL_FOUND)
include_directories(${CMAKE_SOURCE_DIR}/tpls/rapidjson/include)
include_directories(${CMAKE_SOURCE_DIR}/tpls/fire/tensors)
include_directories(${CMAKE_SOURCE_DIR}/tpls/fire/tensors/impl)
include_directories(${CMAKE_SOURCE_DIR}/tpls/fire/tpls/eigen)
include_directories(${CMAKE_SOURCE_DIR}/tpls/fire/tensors)
include_directories(${CMAKE_SOURCE_DIR}/tpls/fire/tensors/impl)
include_directories(${CMAKE_SOURCE_DIR}/tpls/fire/tpls/eigen)
include_directories(${CMAKE_SOURCE_DIR}/quantum/gate/ir)
include_directories(${CMAKE_SOURCE_DIR}/quantum/gate/utils)
include_directories(${CMAKE_SOURCE_DIR}/quantum/gate/ir/instructions)
include_directories(${CMAKE_SOURCE_DIR}/quantum/gate/ir/functions)
include_directories(${CMAKE_SOURCE_DIR}/tpls/fire/util)
include_directories(${CMAKE_SOURCE_DIR}/tpls/fire/tpls/simpleweb)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/utils)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/compiler)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/accelerator)
include_directories(${CMAKE_SOURCE_DIR}/quantum/gate/ir)
include_directories(${CMAKE_SOURCE_DIR}/quantum/gate/utils)
include_directories(${CMAKE_SOURCE_DIR}/quantum/gate/ir/instructions)
include_directories(${CMAKE_SOURCE_DIR}/quantum/gate/ir/functions)
include_directories(${CMAKE_SOURCE_DIR}/tpls/fire/util)
include_directories(${CMAKE_SOURCE_DIR}/tpls/fire/tpls/simpleweb)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/utils)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/compiler)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/accelerator)
set (PACKAGE_NAME "Rigetti XACC")
set (PACKAGE_DESCIPTION "Rigetti XACC Plugins")
set (LIBRARY_NAME xacc-rigetti)
set (PACKAGE_NAME "Rigetti XACC")
set (PACKAGE_DESCIPTION "Rigetti XACC Plugins")
set (LIBRARY_NAME xacc-rigetti)
add_subdirectory(compiler)
add_subdirectory(accelerator)
add_subdirectory(examples)
add_subdirectory(compiler)
add_subdirectory(accelerator)
add_subdirectory(examples)
# Gather tests
file (GLOB test_files tests/*.cpp)
add_tests("${test_files}" "${CMAKE_CURRENT_SOURCE_DIR}" "${Boost_LIBRARIES};xacc-rigetti-accelerator;xacc-rigetti-quilcompiler")
# Gather tests
file (GLOB test_files tests/*.cpp)
add_tests("${test_files}" "${CMAKE_CURRENT_SOURCE_DIR}" "${Boost_LIBRARIES};xacc-rigetti-accelerator;xacc-rigetti-quilcompiler")
endif()
......@@ -29,45 +29,51 @@
#
#**********************************************************************************/
set (PACKAGE_NAME "Rigetti XACC Accelerator")
set (PACKAGE_DESCIPTION "Rigetti XACC Accelerator Framework")
set (LIBRARY_NAME xacc-rigetti-accelerator)
find_package(OpenSSL)
file (GLOB_RECURSE HEADERS *.hpp)
file (GLOB SRC *.cpp)
if (OPENSSL_FOUND)
# Set up dependencies to resources to track changes
usFunctionGetResourceSource(TARGET ${LIBRARY_NAME} OUT SRC)
# Generate bundle initialization code
usFunctionGenerateBundleInit(TARGET ${LIBRARY_NAME} OUT SRC)
set (PACKAGE_NAME "Rigetti XACC Accelerator")
set (PACKAGE_DESCIPTION "Rigetti XACC Accelerator Framework")
set (LIBRARY_NAME xacc-rigetti-accelerator)
add_library(${LIBRARY_NAME} SHARED ${SRC})
file (GLOB_RECURSE HEADERS *.hpp)
file (GLOB SRC *.cpp)
set(_bundle_name xacc_rigetti_accelerator)
# Set up dependencies to resources to track changes
usFunctionGetResourceSource(TARGET ${LIBRARY_NAME} OUT SRC)
# Generate bundle initialization code
usFunctionGenerateBundleInit(TARGET ${LIBRARY_NAME} OUT SRC)
set_target_properties(${LIBRARY_NAME} PROPERTIES
# This is required for every bundle
COMPILE_DEFINITIONS US_BUNDLE_NAME=${_bundle_name}
# This is for convenience, used by other CMake functions
US_BUNDLE_NAME ${_bundle_name}
)
add_library(${LIBRARY_NAME} SHARED ${SRC})
if(BUILD_SHARED_LIBS)
set_target_properties(${LIBRARY_NAME} PROPERTIES
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN 1
)
endif()
set(_bundle_name xacc_rigetti_accelerator)
set_target_properties(${LIBRARY_NAME} PROPERTIES
# This is required for every bundle
COMPILE_DEFINITIONS US_BUNDLE_NAME=${_bundle_name}
# This is for convenience, used by other CMake functions
US_BUNDLE_NAME ${_bundle_name}
)
# Embed meta-data from a manifest.json file
usFunctionEmbedResources(TARGET ${LIBRARY_NAME}
WORKING_DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}
FILES
manifest.json
)
if(BUILD_SHARED_LIBS)
set_target_properties(${LIBRARY_NAME} PROPERTIES
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN 1
)
endif()
target_link_libraries(${LIBRARY_NAME} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} CppMicroServices xacc-quantum-gate)
# Embed meta-data from a manifest.json file
usFunctionEmbedResources(TARGET ${LIBRARY_NAME}
WORKING_DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}
FILES
manifest.json
)
install(TARGETS ${LIBRARY_NAME} DESTINATION lib/plugins/accelerators)
target_link_libraries(${LIBRARY_NAME} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} CppMicroServices xacc-quantum-gate)
install(TARGETS ${LIBRARY_NAME} DESTINATION lib/plugins/accelerators)
else()
message(STATUS "OpenSSL not found, cannot include Rigetti Accelerator plugin.")
endif()
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