Skip to content

Commit 5da9116

Browse files
committed
Add comments, Remove unnecessary code
Fix build issues Fix build issue Remove support for wasm build Remove support for wasm build Remove support for wasm build Fix build issues Update contributers license Update to snake case Fix build issues Fix build issues Fix build issues Fix build issues Fix build issues Fix build issues Fix build issues
1 parent 58a77ab commit 5da9116

File tree

5 files changed

+83
-80
lines changed

5 files changed

+83
-80
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ jobs:
7474
run: |
7575
micromamba shell hook -s cmd.exe -p C:\Users\runneradmin\micromamba-root
7676
77-
- name: activate environment
78-
if: ${{ runner.os != 'windows' }}
79-
shell: bash -l {0}
80-
run: |
81-
micromamba activate xeus-cpp
82-
8377
- name: install cxx compiler
8478
if: ${{ runner.os != 'windows' }}
8579
shell: bash -l {0}
@@ -124,17 +118,13 @@ jobs:
124118
cd build
125119
make install -j ${{ env.ncpus }}
126120
127-
# - name: Setup tmate session
128-
# if: ${{ runner.os != 'windows' }}
129-
# uses: mxschmitt/action-tmate@v3
130-
131121
- name: Test xeus-cpp C++ Unix Systems
132122
if: ${{ runner.os != 'windows' }}
133123
shell: bash -l {0}
134124
run: |
135125
cd build/test
136126
./test_xeus_cpp
137-
timeout-minutes: 30
127+
timeout-minutes: 4
138128

139129
- name: Test xeus-cpp C++ Windows Systems
140130
if: ${{ runner.os == 'windows' }}

CMakeLists.txt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,15 @@ set(XEUS_CPP_SRC
203203
src/xoptions.cpp
204204
src/xparser.cpp
205205
src/xutils.cpp
206-
src/xmagics/xassist.hpp
207-
src/xmagics/xassist.cpp
208206
)
209207

208+
if(NOT EMSCRIPTEN)
209+
list(APPEND XEUS_CPP_SRC
210+
src/xmagics/xassist.hpp
211+
src/xmagics/xassist.cpp
212+
)
213+
endif()
214+
210215
if(EMSCRIPTEN)
211216
list(APPEND XEUS_CPP_SRC src/xinterpreter_wasm.cpp)
212217
endif()
@@ -312,7 +317,8 @@ macro(xeus_cpp_create_target target_name linkage output_name)
312317
set(XEUS_CPP_XEUS_TARGET xeus-static)
313318
endif ()
314319

315-
if(WIN32)
320+
#This is a workaround for the issue with the libcurl target on Windows specifically for xassist
321+
if (WIN32)
316322
# Set the MSVC runtime library
317323
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
318324

@@ -337,8 +343,11 @@ macro(xeus_cpp_create_target target_name linkage output_name)
337343
if (MSVC)
338344
target_compile_options(${target_name} PRIVATE "/MD$<$<CONFIG:Debug>:d>")
339345
endif()
340-
else()
346+
elseif (NOT EMSCRIPTEN)
347+
# Curl initialised specifically for xassist
341348
target_link_libraries(${target_name} PUBLIC ${XEUS_CPP_XEUS_TARGET} clangCppInterOp pugixml argparse::argparse curl)
349+
else ()
350+
target_link_libraries(${target_name} PUBLIC ${XEUS_CPP_XEUS_TARGET} clangCppInterOp pugixml argparse::argparse)
342351
endif()
343352

344353
if (WIN32 OR CYGWIN)

environment-wasm-build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ channels:
44
dependencies:
55
- cmake
66
- emsdk >=3.1.11
7-
- empack >=2.0.1
8-
- curl
7+
- empack >=2.0.1

src/xinterpreter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
#include "xinput.hpp"
2929
#include "xinspect.hpp"
3030
#include "xmagics/os.hpp"
31+
#ifndef EMSCRIPTEN
3132
#include "xmagics/xassist.hpp"
33+
#endif
3234
#include "xparser.hpp"
3335
#include "xsystem.hpp"
3436

@@ -405,6 +407,8 @@ __get_cxx_version ()
405407
// preamble_manager["magics"].get_cast<xmagics_manager>().register_magic("file", writefile());
406408
// preamble_manager["magics"].get_cast<xmagics_manager>().register_magic("timeit", timeit(&m_interpreter));
407409
// preamble_manager["magics"].get_cast<xmagics_manager>().register_magic("python", pythonexec());
410+
#ifndef EMSCRIPTEN
408411
preamble_manager["magics"].get_cast<xmagics_manager>().register_magic("xassist", xassist());
412+
#endif
409413
}
410414
}

0 commit comments

Comments
 (0)