Skip to content

Commit

Permalink
Fixes issues which occur when building on Apple Silicon
Browse files Browse the repository at this point in the history
Link to xeus-zmq
Add option to define where cxxopts folder is (Macbook unable to locate folder without)
Change header file xeus/xserver_zmq.hpp to xeus-zmq/xserver_zmq.hpp
Add #include <iostream> to include/xeus-clang-repl/xmanager.hpp otherwise errors due to use of std::cerr and others
  • Loading branch information
mcbarton committed Nov 20, 2023
1 parent aeb22a7 commit a861e3f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ set(xeus_REQUIRED_VERSION 1.0.0)
set(cppzmq_REQUIRED_VERSION 4.3.0)

find_package(xeus ${xeus_REQUIRED_VERSION} REQUIRED)
find_package(xeus-zmq REQUIRED)
find_package(cppzmq REQUIRED CONFIG)
find_package(pugixml REQUIRED)

Expand All @@ -103,6 +104,11 @@ if(POLICY CMP0077)
endif()

find_package(cxxopts REQUIRED)

# Added as system unable to locate cxxopts include folder on MacOS
set(_cxxopts_install_dir ${cxxopts_install_DIR})
include_directories( ${_cxxopts_install_dir}/include)

set(Python_FIND_VIRTUALENV ONLY)
find_package(Python COMPONENTS Interpreter Development)

Expand Down Expand Up @@ -251,7 +257,7 @@ target_include_directories(xeus-clang-repl SYSTEM
PUBLIC
$<BUILD_INTERFACE:${XEUS_CLANG-REPL_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>)
target_link_libraries(xeus-clang-repl PUBLIC clangCppInterOp xeus pugixml cxxopts::cxxopts)
target_link_libraries(xeus-clang-repl PUBLIC clangCppInterOp xeus xeus-zmq pugixml)

if(APPLE)
target_link_libraries(xeus-clang-repl PUBLIC -Wl,-w -Wl,-bind_at_load -Wl,-undefined,dynamic_lookup)
Expand Down
1 change: 1 addition & 0 deletions include/xeus-clang-repl/xmanager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "nlohmann/json.hpp"

#include <iostream>
#include <map>
#include <memory>
#include <regex>
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "xeus/xkernel.hpp"
#include "xeus/xkernel_configuration.hpp"
#include "xeus/xserver_zmq.hpp"
#include "xeus-zmq/xserver_zmq.hpp"

#include "xeus-clang-repl/xeus_clang-repl_config.hpp"
#include "xeus-clang-repl/xinterpreter.hpp"
Expand Down

0 comments on commit a861e3f

Please sign in to comment.