Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ if(cxxmodules)
message(FATAL_ERROR "cxxmodules is not supported by this compiler")
endif()

set(ROOT_CXXMODULES_COMMONFLAGS "${ROOT_CXXMODULES_COMMONFLAGS} -fmodules -fmodules-cache-path=${CMAKE_BINARY_DIR}/include/pcms/ -fno-autolink -fdiagnostics-show-note-include-stack")
set(ROOT_CXXMODULES_COMMONFLAGS "${ROOT_CXXMODULES_COMMONFLAGS} -fmodules -fmodules-cache-path=${CMAKE_BINARY_DIR}/include/pcms/ -fno-autolink -fdiagnostics-show-note-include-stack -Wno-module-import-in-extern-c")

# FIXME: We should remove this once libc++ supports -fmodules-local-submodule-visibility.
if (APPLE)
Expand Down Expand Up @@ -192,6 +192,7 @@ if(cxxmodules)
configure_file(${CMAKE_SOURCE_DIR}/build/unix/modulemap.overlay.yaml.in ${CMAKE_BINARY_DIR}/include/modulemap.overlay.yaml @ONLY)

configure_file(${CMAKE_SOURCE_DIR}/build/unix/stl.cppmap ${CMAKE_BINARY_DIR}/include/stl.cppmap)
configure_file(${CMAKE_SOURCE_DIR}/build/unix/libc.modulemap ${CMAKE_BINARY_DIR}/include/libc.modulemap)
endif()

# These vars are useful when we want to compile things without cxxmodules.
Expand Down
2 changes: 0 additions & 2 deletions build/rmkdepend/mainroot.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@

#include <string>

extern "C" {
#if defined(__sun) && defined(__SUNPRO_CC)
#include <signal.h>
#endif
#include "def.h"
}

#ifndef WIN32
#include <unistd.h>
Expand Down
40 changes: 40 additions & 0 deletions build/unix/libc.modulemap
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
module "libc" {
export *
module "assert.h" {
export *
header "assert.h"
}
module "ctype.h" {
export *
header "ctype.h"
}
module "errno.h" {
export *
header "errno.h"
}
module "fenv.h" {
export *
header "fenv.h"
}
module "float.h" {
export *
header "float.h"
}
module "inttypes.h" {
export *
header "inttypes.h"
}

module "xlocale.h" {
export *
header "xlocale.h"
}
module "math.h" {
export *
header "math.h"
}
module "stdio.h" {
export *
header "stdio.h"
}
}
7 changes: 7 additions & 0 deletions build/unix/modulemap.overlay.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
'external-contents': '@CMAKE_BINARY_DIR@/include/stl.cppmap'
}
]
},
{ 'name': '/usr/include/', 'type': 'directory',
'contents': [
{ 'name': 'module.modulemap', 'type': 'file',
'external-contents': '@CMAKE_BINARY_DIR@/include/libc.modulemap'
}
]
}
]
}
2 changes: 1 addition & 1 deletion graf2d/asimage/src/TASImage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ ROOT tutorials: `$ROOTSYS/tutorials/image/`
#else
# include "Windows4root.h"
#endif
extern "C" {
#ifndef WIN32
#ifdef R__HAS_COCOA
# define X_DISPLAY_MISSING 1
Expand All @@ -107,6 +106,7 @@ extern "C" {
#endif
# include <afterimage.h>
# include <bmp.h>
extern "C" {
# include <draw.h>
}

Expand Down
3 changes: 1 addition & 2 deletions graf2d/asimage/src/TASPaletteEditor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,15 @@ It is called by a pull down menu item of TASImage.
#include "Windows4root.h"
#endif

extern "C" {
#ifndef WIN32
# include <afterbase.h>
#else
# include <win32/config.h>
# include <win32/afterbase.h>
#endif
# include <afterimage.h>
extern "C" {
# include <bmp.h>

}


Expand Down
2 changes: 0 additions & 2 deletions graf2d/asimage/src/TASPluginGS.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Allows to read PS/EPS/PDF files via GhostScript
# define popen_flags "r"
#endif

extern "C" {
#ifndef WIN32
# include <afterbase.h>
#else
Expand All @@ -39,7 +38,6 @@ extern "C" {
# define X_DISPLAY_MISSING 1
#endif
# include <import.h>
}


ClassImp(TASPluginGS)
Expand Down