Skip to content

Commit

Permalink
Test for Clang by checking --version
Browse files Browse the repository at this point in the history
  • Loading branch information
refi64 committed Mar 9, 2015
1 parent abc612d commit 160af7d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions configure.py
Expand Up @@ -317,8 +317,12 @@ def binary(name):
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']
Expand Down

0 comments on commit 160af7d

Please sign in to comment.