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

turning python back on


Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent 71e7e064
......@@ -124,10 +124,6 @@ if (OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
find_package(PythonLibs)
if(PYTHONLIBS_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXACC_HAS_PYTHON")
endif()
ExternalProject_Add(xacc-core
DEPENDS cppmicroservices restclient-cpp
......@@ -184,7 +180,9 @@ ExternalProject_Add(xacc-quantum
TEST_AFTER_INSTALL 1
)
if(PYTHONLIBS_FOUND)
#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
......@@ -210,7 +208,7 @@ ExternalProject_Add(xacc-python
INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install #DESTDIR=${CMAKE_BINARY_DIR}/stage
TEST_AFTER_INSTALL 1
)
endif()
#endif()
# Install the config file for external projects to use
# This is cool, users just add find_package(XACC REQUIRED) to
......
......@@ -54,12 +54,12 @@ set (LIBRARY_NAME xacc)
file (GLOB HEADERS XACC.hpp ir/*.hpp program/*.hpp compiler/*.hpp accelerator/*.hpp accelerator/remote/*.hpp utils/*.hpp)
file (GLOB SRC *.cpp program/*.cpp utils/*.cpp accelerator/remote/*.cpp)
#find_package(PythonLibs)
#if(PythonLibs_FOUND)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXACC_HAS_PYTHON")
# include_directories(${XACC_ROOT}/tpls/pybind11/include)
# include_directories(${PYTHON_INCLUDE_DIR})
#endif()
find_package(PythonLibs)
if(PythonLibs_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXACC_HAS_PYTHON")
include_directories(${XACC_ROOT}/tpls/pybind11/include)
include_directories(${PYTHON_INCLUDE_DIR})
endif()
set(CppUsLib CppMicroServicesd)
link_directories(${CPPUS_LIBRARY_DIR})
......@@ -76,11 +76,11 @@ 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()
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()
endif()
# Get the test files
file(GLOB test_files utils/tests/*Tester.cpp accelerator/tests/*Tester.cpp)
......
Markdown is supported
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