hasufell-repository/packages/dev-util/bam/files/27b28f0956a78844e73aa94fee7d0187c9b68bbd.patch

32 lines
1.1 KiB
Diff

From 27b28f0956a78844e73aa94fee7d0187c9b68bbd Mon Sep 17 00:00:00 2001
From: Magnus Auvinen <git@matricks.se>
Date: Sun, 19 Jun 2016 15:58:22 +0200
Subject: [PATCH] fixed issues with CC environment variables
---
src/tools.lua | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/tools.lua b/src/tools.lua
index f3b9b10..ce7cfeb 100644
--- a/src/tools.lua
+++ b/src/tools.lua
@@ -5,14 +5,11 @@ function SetDefaultDrivers(settings)
if _checked_default_drivers == false then
_checked_default_drivers = true
if os.getenv("CC") then
- if string.match(os.getenv("CC"), "^clang") then
- print("CLANG!")
+ if string.match(os.getenv("CC"), ".*clang.*") then
SetDriversDefault = SetDriversClang
- elseif string.match(os.getenv("CC"), "^gcc") then
- print("GCC!")
+ elseif string.match(os.getenv("CC"), ".*gcc.*") then
SetDriversDefault = SetDriversGCC
- elseif string.match(os.getenv("CC"), "^clang") then
- print("CL!")
+ elseif string.match(os.getenv("CC"), ".*cl.*") then
SetDriversDefault = SetDriversCL
end
else