diff options
author | Nico Weber <nicolasweber@gmx.de> | 2015-03-09 04:42:41 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2015-03-09 04:42:41 (GMT) |
commit | fbfa6921ca08bd96617745aa3da2cbf7bd68fad9 (patch) | |
tree | 74b591489b1ecd45a58cfb50ef45c69fa563749b | |
parent | abc612d4eb6625af6a4b0702f16ab24e5b5a315d (diff) | |
parent | 160af7d034b0016409b2602cd766dd0a7a590a8e (diff) | |
download | Ninja-fbfa6921ca08bd96617745aa3da2cbf7bd68fad9.zip Ninja-fbfa6921ca08bd96617745aa3da2cbf7bd68fad9.tar.gz Ninja-fbfa6921ca08bd96617745aa3da2cbf7bd68fad9.tar.bz2 |
Merge pull request #925 from kirbyfan64/master
Test for Clang by checking --version
-rwxr-xr-x | configure.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.py b/configure.py index fe71372..cb08c17 100755 --- a/configure.py +++ b/configure.py @@ -317,8 +317,12 @@ else: cflags.remove('-fno-rtti') # Needed for above pedanticness. else: cflags += ['-O2', '-DNDEBUG'] - if 'clang' in os.path.basename(CXX): - cflags += ['-fcolor-diagnostics'] + try: + proc = subprocess.Popen([CXX, '--version'], stdout=subprocess.PIPE) + if 'clang' in proc.communicate()[0].decode('utf-8'): + cflags += ['-fcolor-diagnostics'] + except: + pass if platform.is_mingw(): cflags += ['-D_WIN32_WINNT=0x0501'] ldflags = ['-L$builddir'] |