From 2ec29b8add235858d70121399e21d7fb2178ee8c Mon Sep 17 00:00:00 2001 From: Frithjof Schulze Date: Mon, 5 Feb 2018 17:35:30 +0100 Subject: [PATCH] Fix SConstruct for darwin. This fixes the build to respect CC=gcc on darwin and to ignore a warning that breaks the build with xcodes's clang on my system. --- SConstruct | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index 41b467e9..2abb7f09 100644 --- a/SConstruct +++ b/SConstruct @@ -84,7 +84,7 @@ AddOption('--tests', env['CC'] = os.getenv('CC') or env['CC'] env['CXX'] = os.getenv('CXX') or env['CXX'] -if os.getenv('CC') == 'clang' or env['PLATFORM'] == 'darwin': +if os.getenv('CC') == 'clang' or (env['PLATFORM'] == 'darwin' and os.getenv('CC') == None): env.Replace(CC='clang', CXX='clang++') @@ -102,7 +102,7 @@ if env['CC'] == 'cl': ] ) else: - env.MergeFlags('-std=gnu99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-attributes -Wno-unused-variable') + env.MergeFlags('-std=gnu99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-attributes -Wno-unused-variable -Wno-unknown-warning-option') # Linker options if env['PLATFORM'] == 'darwin':