Skip to content

Commit d71bbbb

Browse files
committed
Update cxx-compiler and address resource dir config
1 parent a0f92be commit d71bbbb

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CMakeLists.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,21 @@ find_package(pugixml REQUIRED)
112112
# Configuration
113113
# =============
114114

115+
if (CPPINTEROP_LLVM_VERSION_MAJOR VERSION_GREATER ${CMAKE_CXX_COMPILER_VERSION})
116+
message(WARNING "The resource directory being used corresponds to clang version ${CMAKE_CXX_COMPILER_VERSION}. \
117+
It should be updated to match clang version ${CPPINTEROP_LLVM_VERSION_MAJOR} once cppinterop \
118+
can provide a compatible resource directory.")
119+
endif()
120+
string(REGEX MATCH "^([0-9]+)" CXX_MAJOR_VERSION ${CMAKE_CXX_COMPILER_VERSION})
121+
115122
if (NOT DEFINED XEUS_CPP_KERNELSPEC_PATH)
116123
set(XEUS_CPP_KERNELSPEC_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/")
117124
endif ()
118125

119126
function(configure_kernel kernel)
120127
set(XEUS_CPP_PATH "$ENV{PATH}")
121128
set(XEUS_CPP_LD_LIBRARY_PATH "$ENV{LD_LIBRARY_PATH}")
122-
set(XEUS_CPP_RESOURCE_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/clang/${CPPINTEROP_LLVM_VERSION_MAJOR})
129+
set(XEUS_CPP_RESOURCE_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/clang/${CXX_MAJOR_VERSION})
123130
set(XEUS_CPP_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
124131

125132
if (WIN32)

environment-dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dependencies:
55
# Build dependencies
66
- make
77
- cmake
8-
- cxx-compiler=1.7.0
8+
- cxx-compiler>=1.8.0
99
# Host dependencies
1010
- xeus>=5.0.0
1111
- xeus-zmq>=3.0,<4.0

0 commit comments

Comments
 (0)