From 496d680bf1aa392132b0ee6e078f814393a0daa3 Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Fri, 9 Feb 2024 11:43:39 +0100 Subject: [PATCH] Upgraded to xeus 3.2.0 and CMakeLists.txt clenaup --- CMakeLists.txt | 17 +++-------------- environment-dev.yml | 6 +++--- environment-wasm-host.yml | 4 ++-- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a2256c1..251ab90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ #The full license is in the file LICENSE, distributed with this software. ############################################################################# -cmake_minimum_required(VERSION 3.4.3) +cmake_minimum_required(VERSION 3.5) project(xeus-lua) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}") @@ -35,9 +35,6 @@ if (NOT DEFINED XEUS_LUA_KERNELSPEC_PATH) set(XEUS_LUA_KERNELSPEC_PATH "${CMAKE_INSTALL_FULL_BINDIR}/") endif () - - - configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/share/jupyter/kernels/xlua/kernel.json.in" "${CMAKE_CURRENT_SOURCE_DIR}/share/jupyter/kernels/xlua/kernel.json" @@ -212,6 +209,7 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE) set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib; ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") macro(xeus_lua_set_common_options target_name) + target_compile_features(${target_name} PRIVATE cxx_std_17) if (MSVC) target_compile_options(${target_name} PUBLIC /wd4251 /wd4141) target_compile_options(${target_name} PUBLIC /wd4018 /wd4267 /wd4715 /wd4146 /wd4129) @@ -222,14 +220,6 @@ macro(xeus_lua_set_common_options target_name) CMAKE_CXX_COMPILER_ID MATCHES "Intel") target_compile_options(${target_name} PUBLIC -Wunused-parameter -Wextra -Wreorder) - - # 17 flag - CHECK_CXX_COMPILER_FLAG("-std=c++17" HAS_CPP_17_FLAG) - if (HAS_CPP_17_FLAG) - target_compile_features(${target_name} PRIVATE cxx_std_17) - else () - message(FATAL_ERROR "Unsupported compiler -- xeus-lua requires 17 support!") - endif () endif () if (APPLE) @@ -375,7 +365,6 @@ endif () if (XEUS_LUA_BUILD_EXECUTABLE) find_package(xeus-zmq 1.0.1 REQUIRED) add_executable(xlua ${XEUS_LUA_MAIN_SRC}) - target_compile_features(xlua PRIVATE cxx_std_17) xeus_lua_set_common_options(xlua) xeus_lua_set_kernel_options(xlua) target_link_libraries(xlua PRIVATE xeus-zmq) @@ -385,7 +374,7 @@ if(EMSCRIPTEN) include(WasmBuildOptions) find_package(xeus-lite REQUIRED) add_executable(xlua src/main_emscripten_kernel.cpp ) - target_link_libraries(xlua PRIVATE xeus-lite) + target_link_libraries(xlua PRIVATE xeus-lite) target_compile_features(xlua PRIVATE cxx_std_17) xeus_lua_set_kernel_options(xlua) xeus_wasm_compile_options(xlua) diff --git a/environment-dev.yml b/environment-dev.yml index 7f1e7f8..7d3d893 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -6,14 +6,14 @@ dependencies: - cmake - cxx-compiler # Host dependencies - - xeus-zmq>=1.0, <2.0 + - xeus-zmq>=1.3.0, <2.0 - nlohmann_json - cppzmq - xtl>=0.7 - lua>=5.2.0 - openlibm # [linux] - - xwidgets <0.28 - - xcanvas>=0.4.1 + - xwidgets <0.29 + - xcanvas>=0.4.2 # to try it out - jupyterlab # Test dependencies diff --git a/environment-wasm-host.yml b/environment-wasm-host.yml index 19a2240..6574860 100644 --- a/environment-wasm-host.yml +++ b/environment-wasm-host.yml @@ -6,7 +6,7 @@ dependencies: - lua - nlohmann_json - xeus-lite - - xeus >=3.0.5,<4.0 + - xeus >=3.2.0,<4.0 - xtl >=0.7,<0.8 - xcanvas >=0.4,<5.0 - - xwidgets >=0.27.3,<1.0 \ No newline at end of file + - xwidgets >=0.27.3,<1.0