Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Ninja as the build system if available (not only on Windows). #96

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
9 changes: 4 additions & 5 deletions utils/python/codal_utils.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import os
import sys
import optparse
import platform
import json
import shutil
import re

import os, re, json, xml.etree.ElementTree
from optparse import OptionParser
import subprocess


Expand All @@ -16,7 +12,10 @@ def system(cmd):
sys.exit(1)

def build(clean, verbose = False, parallelism = 10):
if platform.system() == "Windows":
# Use Ninja on Windows, or if available in any other OS
use_ninja = shutil.which("ninja") is not None or platform.system() == "Windows"

if use_ninja:
# configure
system("cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -G \"Ninja\"")

Expand Down
Loading