Commit 441444b8 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

turning off mlir work for mac build

parent 6630bb97
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -60,7 +60,10 @@ add_subdirectory(handlers)
add_subdirectory(runtime)
add_subdirectory(tools)
add_subdirectory(lib)

if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  add_subdirectory(mlir)
endif()

if (QCOR_BUILD_TESTS)
  add_subdirectory(examples)
+10 −1
Original line number Diff line number Diff line
@@ -14,6 +14,10 @@ if (NOT ${XACC_ROOT} MATCHES ${CMAKE_INSTALL_PREFIX})
  set (QCOR_APPEND_PLUGIN_PATH "${CMAKE_INSTALL_PREFIX}/plugins")
endif()

if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  add_definitions(-DQCOR_BUILD_MLIR_PYTHON_API)
endif()

configure_file(qcor.in.py
            ${CMAKE_BINARY_DIR}/qcor.py)

@@ -24,7 +28,12 @@ target_include_directories(${LIBRARY_NAME} PUBLIC . ${CMAKE_SOURCE_DIR}/runtime/
                                          ${Python_INCLUDE_DIRS}
                                          ${XACC_ROOT}/include/pybind11/include)
set_target_properties(${LIBRARY_NAME} PROPERTIES PREFIX "")

if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  target_link_libraries(${LIBRARY_NAME} PUBLIC qcor qcor-quasimo qcor-jit qcor-mlir-api xacc::xacc)
else()
  target_link_libraries(${LIBRARY_NAME} PUBLIC qcor qcor-quasimo qcor-jit xacc::xacc)
endif()

if(APPLE)
   set_target_properties(${LIBRARY_NAME} PROPERTIES INSTALL_RPATH "@loader_path/lib")
+5 −0
Original line number Diff line number Diff line
@@ -12,7 +12,10 @@
#include "py_costFunctionEvaluator.hpp"
#include "py_qsimWorkflow.hpp"
#include "qcor_jit.hpp"
#ifdef QCOR_BUILD_MLIR_PYTHON_API
#include "qcor_mlir_api.hpp"
#endif 

#include "qcor_observable.hpp"
#include "qrt.hpp"
#include "xacc.hpp"
@@ -726,6 +729,7 @@ PYBIND11_MODULE(_pyqcor, m) {
    return ret;
  });

#ifdef QCOR_BUILD_MLIR_PYTHON_API
  m.def("openqasm_to_mlir",
        [](const std::string &oqasm_src, const std::string &kernel_name,
           bool add_entry_point) {
@@ -746,6 +750,7 @@ PYBIND11_MODULE(_pyqcor, m) {
          return qcor::mlir_compile("openqasm", oqasm_src, kernel_name,
                                    qcor::OutputType::LLVMIR, add_entry_point);
        });
#endif 

  // QuaSiMo sub-module bindings:
  {