mirror of
https://github.com/mrexodia/phnt-single-header
synced 2026-06-08 16:10:51 +00:00
Force __has_include checks on in amalgamation
This commit is contained in:
+9
-5
@@ -70,11 +70,15 @@ def main():
|
||||
with open("out/LICENSE", "w") as f:
|
||||
f.write(license)
|
||||
out_path = "out/phnt.h"
|
||||
exec(f"\"{cpp_amalgamate}\" -d systeminformer/phnt/include phnt_amalgamate.h -o \"{out_path}\"")
|
||||
with open(out_path, "r") as f:
|
||||
header = f.read()
|
||||
with open(out_path, "w") as f:
|
||||
f.write("/*\n\n")
|
||||
exec(f"\"{cpp_amalgamate}\" -d systeminformer/phnt/include phnt_amalgamate.h -o \"{out_path}\"")
|
||||
with open(out_path, "r") as f:
|
||||
header = f.read()
|
||||
header = header.replace(
|
||||
"#if __has_include (",
|
||||
"#if 1 // __has_include ("
|
||||
)
|
||||
with open(out_path, "w") as f:
|
||||
f.write("/*\n\n")
|
||||
f.write("+===========================================================+\n")
|
||||
f.write("| THIS FILE WAS AUTOMATICALLY GENERATED |\n")
|
||||
f.write("+===========================================================+\n")
|
||||
|
||||
Reference in New Issue
Block a user