File tree Expand file tree Collapse file tree 8 files changed +55
-7
lines changed
Expand file tree Collapse file tree 8 files changed +55
-7
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,7 @@ if(cxxmodules)
192192 configure_file (${CMAKE_SOURCE_DIR} /build /unix /modulemap.overlay.yaml.in ${CMAKE_BINARY_DIR} /include /modulemap.overlay.yaml @ONLY)
193193
194194 configure_file (${CMAKE_SOURCE_DIR} /build /unix /stl.cppmap ${CMAKE_BINARY_DIR} /include /stl.cppmap)
195+ configure_file (${CMAKE_SOURCE_DIR} /build /unix /libc.modulemap ${CMAKE_BINARY_DIR} /include /libc.modulemap)
195196 endif ()
196197
197198 # These vars are useful when we want to compile things without cxxmodules.
Original file line number Diff line number Diff line change 2727
2828#include < string>
2929
30- extern " C" {
3130#if defined(__sun) && defined(__SUNPRO_CC)
3231#include < signal.h>
3332#endif
3433#include " def.h"
35- }
3634
3735#ifndef WIN32
3836#include < unistd.h>
Original file line number Diff line number Diff line change 1+ module "libc" {
2+ export *
3+ module "assert.h" {
4+ export *
5+ header "assert.h"
6+ }
7+ module "ctype.h" {
8+ export *
9+ header "ctype.h"
10+ }
11+ module "errno.h" {
12+ export *
13+ header "errno.h"
14+ }
15+ module "fenv.h" {
16+ export *
17+ header "fenv.h"
18+ }
19+ module "float.h" {
20+ export *
21+ header "float.h"
22+ }
23+ module "inttypes.h" {
24+ export *
25+ header "inttypes.h"
26+ }
27+
28+ module "xlocale.h" {
29+ export *
30+ header "xlocale.h"
31+ }
32+ module "math.h" {
33+ export *
34+ header "math.h"
35+ }
36+ module "stdio.h" {
37+ export *
38+ header "stdio.h"
39+ }
40+ }
Original file line number Diff line number Diff line change 88 'external-contents': '@CMAKE_BINARY_DIR@/include/stl.cppmap'
99 }
1010 ]
11+ },
12+ { 'name': '/usr/include/', 'type': 'directory',
13+ 'contents': [
14+ { 'name': 'module.modulemap', 'type': 'file',
15+ 'external-contents': '@CMAKE_BINARY_DIR@/include/libc.modulemap'
16+ }
17+ ]
1118 }
1219 ]
1320}
Original file line number Diff line number Diff line change @@ -94,7 +94,6 @@ ROOT tutorials: `$ROOTSYS/tutorials/image/`
9494#else
9595# include " Windows4root.h"
9696#endif
97- extern " C" {
9897#ifndef WIN32
9998#ifdef R__HAS_COCOA
10099# define X_DISPLAY_MISSING 1
@@ -107,6 +106,7 @@ extern "C" {
107106#endif
108107# include < afterimage.h>
109108# include < bmp.h>
109+ extern " C" {
110110# include < draw.h>
111111}
112112
Original file line number Diff line number Diff line change @@ -40,16 +40,15 @@ It is called by a pull down menu item of TASImage.
4040#include " Windows4root.h"
4141#endif
4242
43- extern " C" {
4443#ifndef WIN32
4544# include < afterbase.h>
4645#else
4746# include < win32/config.h>
4847# include < win32/afterbase.h>
4948#endif
5049# include < afterimage.h>
50+ extern " C" {
5151# include < bmp.h>
52-
5352}
5453
5554
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ Allows to read PS/EPS/PDF files via GhostScript
3030# define popen_flags " r"
3131#endif
3232
33- extern " C" {
3433#ifndef WIN32
3534# include < afterbase.h>
3635#else
@@ -39,7 +38,6 @@ extern "C" {
3938# define X_DISPLAY_MISSING 1
4039#endif
4140# include < import.h>
42- }
4341
4442
4543ClassImp (TASPluginGS)
Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ endif()
5252string (REPLACE -Wall "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS} " )
5353if (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
5454 ROOT_ADD_C_FLAG(CMAKE_C_FLAGS -Wno-parentheses-equality)
55+ # unuran is including some modules from libc within extern-C.
56+ # This is disabling that clang is throwing an error when doing this.
57+ if (cxxmodules)
58+ ROOT_ADD_C_FLAG(CMAKE_C_FLAGS -Wno-module-import-in-extern-c)
59+ endif ()
5560endif ()
5661
5762include_directories (BEFORE ${UNR_UNTARDIR} ${UNR_UNTARDIR} /src ${UNR_UNTARDIR} /src/utils)
You can’t perform that action at this time.
0 commit comments