diff --git a/core/clingutils/CMakeLists.txt b/core/clingutils/CMakeLists.txt index b470eb1e654c9..0c8df994ecad5 100644 --- a/core/clingutils/CMakeLists.txt +++ b/core/clingutils/CMakeLists.txt @@ -107,7 +107,9 @@ set(clinginclude ${CMAKE_SOURCE_DIR}/interpreter/cling/include) set(custom_modulemaps) if (runtime_cxxmodules) - set(custom_modulemaps boost.modulemap tinyxml2.modulemap cuda.modulemap module.modulemap.build) + set(custom_modulemaps boost.modulemap tinyxml2.modulemap cuda.modulemap + module.modulemap.build + json.modulemap) # FIXME: We should install vc.modulemap only when Vc is found (Vc_FOUND) but # some systems install it under /usr/include/Vc/Vc which allows rootcling to # discover it and assert that the modulemap is not found. diff --git a/graf3d/eve7/CMakeLists.txt b/graf3d/eve7/CMakeLists.txt index 74aab3544551a..84fb2ab2a8b93 100644 --- a/graf3d/eve7/CMakeLists.txt +++ b/graf3d/eve7/CMakeLists.txt @@ -123,6 +123,8 @@ ROOT_STANDARD_LIBRARY_PACKAGE(ROOTEve src/REveViewer.cxx src/REveVSD.cxx src/REveVSDStructs.cxx + DICTIONARY_OPTIONS + -mByproduct Json DEPENDENCIES Core Geom diff --git a/interpreter/cling/include/cling/json.modulemap b/interpreter/cling/include/cling/json.modulemap new file mode 100644 index 0000000000000..758cf2d779e2c --- /dev/null +++ b/interpreter/cling/include/cling/json.modulemap @@ -0,0 +1,4 @@ +module Json { + header "nlohmann/json.hpp" + export * +} diff --git a/interpreter/cling/lib/Interpreter/CIFactory.cpp b/interpreter/cling/lib/Interpreter/CIFactory.cpp index 52e882507564c..0891130268de0 100644 --- a/interpreter/cling/lib/Interpreter/CIFactory.cpp +++ b/interpreter/cling/lib/Interpreter/CIFactory.cpp @@ -580,6 +580,7 @@ namespace { llvm::SmallString<256> tinyxml2IncLoc(getIncludePathForHeader(HS, "tinyxml2.h")); llvm::SmallString<256> cudaIncLoc(getIncludePathForHeader(HS, "cuda.h")); llvm::SmallString<256> vcVcIncLoc(getIncludePathForHeader(HS, "Vc/Vc")); + llvm::SmallString<256> jsonIncLoc(getIncludePathForHeader(HS, "nlohmann/json.hpp")); llvm::SmallString<256> clingIncLoc(getIncludePathForHeader(HS, "cling/Interpreter/RuntimeUniverse.h")); @@ -705,6 +706,11 @@ namespace { clingIncLoc.str(), MOverlay, /*RegisterModuleMap=*/ true, /*AllowModulemapOverride=*/ false); + if (!jsonIncLoc.empty()) + maybeAppendOverlayEntry(jsonIncLoc.str(), "json.modulemap", + clingIncLoc.str(), MOverlay, + /*RegisterModuleMap=*/ true, + /*AllowModulemapOverride=*/ false); if (!boostIncLoc.empty()) { // Add the modulemap in the include/boost folder not in include. llvm::sys::path::append(boostIncLoc, "boost");