Skip to content

Commit 84088d9

Browse files
committed
Address reviews
1 parent 83f6d17 commit 84088d9

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,7 @@ function(configure_kernel kernel)
152152
endfunction()
153153

154154
message("Configure kernels: ...")
155-
if(NOT EMSCRIPTEN)
156-
configure_kernel("/share/jupyter/kernels/xcpp17/")
157-
configure_kernel("/share/jupyter/kernels/xcpp20/")
158-
else()
155+
if(EMSCRIPTEN)
159156
# TODO: Currently jupyterlite-xeus and xeus-lite do not provide
160157
# methods to fetch information from the arguments present in the
161158
# generated emscripten kernel.
@@ -167,6 +164,9 @@ else()
167164
# 3) Finally we should fetch the C++ version from the kernel.json file and
168165
# be able to pass it to our wasm interpreter rather than forcing a version.
169166
configure_kernel("/share/jupyter/kernels/xcpp20/")
167+
else()
168+
configure_kernel("/share/jupyter/kernels/xcpp17/")
169+
configure_kernel("/share/jupyter/kernels/xcpp20/")
170170
endif()
171171

172172
# Source files
@@ -415,6 +415,8 @@ if(EMSCRIPTEN)
415415
xeus_cpp_set_kernel_options(xcpp)
416416
xeus_wasm_compile_options(xcpp)
417417
xeus_wasm_link_options(xcpp "web,worker")
418+
# TODO: Remove the exported runtime methods
419+
# after the next xeus release.
418420
target_link_options(xcpp PUBLIC
419421
-sEXPORTED_RUNTIME_METHODS=FS,PATH,ERRNO_CODES
420422
# add sysroot location here
@@ -423,7 +425,7 @@ if(EMSCRIPTEN)
423425
# TODO: Emscripten supports preloading files just once before it generates
424426
# the xcpp.data file (containing the binary representation of the file(s) we
425427
# want to include in our application).
426-
# Hence although we are adding supporting for Standard Headers, Libraries etc
428+
# Hence although we are adding support for Standard Headers, Libraries etc
427429
# through emscripten's sysroot for now, we need to do the following:
428430
# 1) Enable CppInterOp to provide us with a resource dir.
429431
# 2) If the above cannot be done, we can use the resource dir provided

include/xeus-cpp/xinterpreter_wasm.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef XEUS_CPP_INTERPRETER_WASM_HPP
1111
#define XEUS_CPP_INTERPRETER_WASM_HPP
1212

13+
#include <vector>
14+
1315
#include "xinterpreter.hpp"
1416
#include "xeus_cpp_config.hpp"
1517

src/xinterpreter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ __get_cxx_version ()
9999
auto cxx_version = Cpp::Evaluate(code);
100100
return std::to_string(cxx_version);
101101
#else
102-
constexpr int cxx_version = 20;
103-
return std::to_string(cxx_version);
102+
return "20";
104103
#endif
105104
}
106105

0 commit comments

Comments
 (0)