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
217 changes: 110 additions & 107 deletions cmake/unix/makepchinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,113 +52,116 @@ def getGuardedStlInclude(headerName):

#-------------------------------------------------------------------------------
def getSTLIncludes():
"""
Here we include the list of c++11 stl headers
From http://en.cppreference.com/w/cpp/header
valarray is removed because it causes lots of compilation at startup.
"""
stlHeadersList = ("cstdlib",
"csignal",
"csetjmp",
"cstdarg",
"typeinfo",
"typeindex",
"type_traits",
"bitset",
"functional",
"utility",
"ctime",
"chrono",
"cstddef",
"initializer_list",
"tuple",
"new",
"memory",
"scoped_allocator",
"climits",
"cfloat",
"cstdint",
"cinttypes",
"limits",
"exception",
"stdexcept",
"cassert",
"system_error",
"cerrno",
"cctype",
"cwctype",
"cstring",
"cwchar",
"cuchar",
"string",
"array",
"vector",
"deque",
"list",
"forward_list",
"set",
"map",
"unordered_set",
"unordered_map",
"stack",
"queue",
"algorithm",
"iterator",
"cmath",
"complex",
# "valarray",
"random",
"numeric",
"ratio",
"cfenv",
"iosfwd",
"ios",
"istream",
"ostream",
"iostream",
"fstream",
"sstream",
"iomanip",
"streambuf",
"cstdio",
"locale",
"clocale",
"codecvt",
"atomic",
"thread",
"mutex",
"future",
"condition_variable",
"ciso646",
"ccomplex",
"ctgmath",
"regex",
"cstdbool")

allHeadersPartContent = "// STL headers\n"

for header in stlHeadersList:
allHeadersPartContent += getGuardedStlInclude(header)

# Special case for regex
allHeadersPartContent += '// treat regex separately\n' +\
'#if __has_include("regex") && !defined __APPLE__\n' +\
'#include <regex>\n' +\
'#endif\n'

# treat this deprecated headers in a special way
stlDeprecatedHeadersList=["strstream"]
allHeadersPartContent += '// STL Deprecated headers\n' +\
'#define _BACKWARD_BACKWARD_WARNING_H\n' +\
"#pragma clang diagnostic push\n" +\
'#pragma GCC diagnostic ignored "-Wdeprecated"\n'

for header in stlDeprecatedHeadersList:
allHeadersPartContent += getGuardedStlInclude(header)

allHeadersPartContent += '#pragma clang diagnostic pop\n' +\
'#undef _BACKWARD_BACKWARD_WARNING_H\n'
return allHeadersPartContent
"""
Here we include the list of c++11 stl headers
From http://en.cppreference.com/w/cpp/header
valarray is removed because it causes lots of compilation at startup.
"""
stlHeadersList = (
"cstdlib",
"csignal",
"csetjmp",
"cstdarg",
"typeinfo",
"typeindex",
"type_traits",
"bitset",
"functional",
"utility",
"ctime",
"chrono",
"cstddef",
"initializer_list",
"tuple",
"new",
"memory",
"scoped_allocator",
"climits",
"cfloat",
"cstdint",
"cinttypes",
"limits",
"exception",
"stdexcept",
"cassert",
"system_error",
"cerrno",
"cctype",
"cwctype",
"cstring",
"cwchar",
"cuchar",
"string",
"array",
"vector",
"deque",
"list",
"forward_list",
"set",
"map",
"unordered_set",
"unordered_map",
"stack",
"queue",
"algorithm",
"iterator",
"cmath",
"complex",
# "valarray",
"random",
"numeric",
"ratio",
"cfenv",
"iosfwd",
"ios",
"istream",
"ostream",
"iostream",
"fstream",
"sstream",
"iomanip",
"streambuf",
"cstdio",
"locale",
"clocale",
"codecvt",
"atomic",
"thread",
"mutex",
"future",
"condition_variable",
"ciso646",
"regex",
)

allHeadersPartContent = "// STL headers\n"

for header in stlHeadersList:
allHeadersPartContent += getGuardedStlInclude(header)

# Special case for regex
allHeadersPartContent += (
"// treat regex separately\n"
+ '#if __has_include("regex") && !defined __APPLE__\n'
+ "#include <regex>\n"
+ "#endif\n"
)

# treat this deprecated headers in a special way
stlDeprecatedHeadersList = ["strstream"]
allHeadersPartContent += (
"// STL Deprecated headers\n"
+ "#define _BACKWARD_BACKWARD_WARNING_H\n"
+ "#pragma clang diagnostic push\n"
+ '#pragma GCC diagnostic ignored "-Wdeprecated"\n'
)

for header in stlDeprecatedHeadersList:
allHeadersPartContent += getGuardedStlInclude(header)

allHeadersPartContent += "#pragma clang diagnostic pop\n" + "#undef _BACKWARD_BACKWARD_WARNING_H\n"
return allHeadersPartContent


#-------------------------------------------------------------------------------
def getExtraIncludes(headers):
Expand Down
17 changes: 1 addition & 16 deletions interpreter/cling/include/cling/std.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ module "std" [system] {
header "bitset"
}
// no module for cassert to stay consistent with the OS X modulemap
module "ccomplex" {
export *
header "ccomplex"
}
module "cctype" {
export *
header "cctype"
Expand All @@ -48,6 +44,7 @@ module "std" [system] {
header "cinttypes"
}
module "ciso646" {
requires !cplusplus20
export *
header "ciso646"
}
Expand Down Expand Up @@ -93,18 +90,10 @@ module "std" [system] {
export *
header "csignal"
}
module "cstdalign" {
export *
header "cstdalign"
}
module "cstdarg" {
export *
header "cstdarg"
}
module "cstdbool" {
export *
header "cstdbool"
}
module "cstddef" {
export *
header "cstddef"
Expand Down Expand Up @@ -132,10 +121,6 @@ module "std" [system] {
export *
header "cstring"
}
module "ctgmath" {
export *
header "ctgmath"
}
module "ctime" {
export *
header "ctime"
Expand Down
17 changes: 1 addition & 16 deletions interpreter/cling/include/cling/std_msvc.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ module "std" [system] {
export *
header "cassert"
}
module "ccomplex" {
export *
header "ccomplex"
}
module "cctype" {
export *
header "cctype"
Expand Down Expand Up @@ -72,6 +68,7 @@ module "std" [system] {
header "cinttypes"
}
module "ciso646" {
requires !cplusplus20
export *
header "ciso646"
}
Expand Down Expand Up @@ -117,18 +114,10 @@ module "std" [system] {
export *
header "csignal"
}
module "cstdalign" {
export *
header "cstdalign"
}
module "cstdarg" {
export *
header "cstdarg"
}
module "cstdbool" {
export *
header "cstdbool"
}
module "cstddef" {
export *
header "cstddef"
Expand All @@ -149,10 +138,6 @@ module "std" [system] {
export *
header "cstring"
}
module "ctgmath" {
export *
header "ctgmath"
}
module "ctime" {
export *
header "ctime"
Expand Down
Loading