Skip to content

Commit 2f66048

Browse files
committed
Build ninja with c++17
1 parent 14372d6 commit 2f66048

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

preconfigure.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ def build_ninja():
6969
)
7070
except OSError:
7171
print("ninja executable not found. Building ...")
72-
subprocess.run(["python3", "configure.py", "--bootstrap"], cwd=ninjapath)
72+
# Specify C++17
73+
env = os.environ.copy()
74+
env["CXXFLAGS"] = env.get("CXXFLAGS", "") + " -std=c++17"
75+
subprocess.run(["python3", "configure.py", "--bootstrap"], cwd=ninjapath, env=env)
7376
shutil.copy(ninjapath + os.path.sep + "ninja", ".")
7477

7578

@@ -84,7 +87,6 @@ def run(
8487
own_fado=True,
8588
own_mlpcpp=True,
8689
):
87-
8890
# Set up the build environment, i.e. clone or download submodules
8991
init_submodules(
9092
method="auto",

0 commit comments

Comments
 (0)