diff --git a/CMakeLists.txt b/CMakeLists.txt index fd777a74..ad4c9efc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,6 +112,13 @@ find_package(pugixml REQUIRED) # Configuration # ============= +if (CPPINTEROP_LLVM_VERSION_MAJOR VERSION_GREATER ${CMAKE_CXX_COMPILER_VERSION}) + message(WARNING "The resource directory being used corresponds to clang version ${CMAKE_CXX_COMPILER_VERSION}. \ + It should be updated to match clang version ${CPPINTEROP_LLVM_VERSION_MAJOR} once cppinterop \ + can provide a compatible resource directory.") +endif() +string(REGEX MATCH "^([0-9]+)" CXX_MAJOR_VERSION ${CMAKE_CXX_COMPILER_VERSION}) + if (NOT DEFINED XEUS_CPP_KERNELSPEC_PATH) set(XEUS_CPP_KERNELSPEC_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/") endif () @@ -119,7 +126,7 @@ endif () function(configure_kernel kernel) set(XEUS_CPP_PATH "$ENV{PATH}") set(XEUS_CPP_LD_LIBRARY_PATH "$ENV{LD_LIBRARY_PATH}") - set(XEUS_CPP_RESOURCE_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/clang/${CPPINTEROP_LLVM_VERSION_MAJOR}) + set(XEUS_CPP_RESOURCE_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/clang/${CXX_MAJOR_VERSION}) set(XEUS_CPP_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include) if (WIN32) diff --git a/environment-dev.yml b/environment-dev.yml index 256679a9..a9f2d339 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -21,4 +21,4 @@ dependencies: - nbformat - nbval - pytest-rerunfailures - - doctest \ No newline at end of file + - doctest