Merge pull request #99 from moomalade/make_cc_override

Enable Makefile environment overrides for CC,CXX and AR.
This commit is contained in:
Manu Evans 2015-06-13 10:43:04 +10:00
commit 2851751963
2 changed files with 18 additions and 6 deletions

View File

@ -359,17 +359,23 @@
function make.cppTools(cfg, toolset)
local tool = toolset.gettoolname(cfg, "cc")
if tool then
_p(' CC = %s', tool)
_p(' ifeq ($(origin CC), default)')
_p(' CC = %s', tool)
_p(' endif' )
end
tool = toolset.gettoolname(cfg, "cxx")
if tool then
_p(' CXX = %s', tool)
_p(' ifeq ($(origin CXX), default)')
_p(' CXX = %s', tool)
_p(' endif' )
end
tool = toolset.gettoolname(cfg, "ar")
if tool then
_p(' AR = %s', tool)
_p(' ifeq ($(origin AR), default)')
_p(' AR = %s', tool)
_p(' endif' )
end
tool = toolset.gettoolname(cfg, "rc")

View File

@ -31,9 +31,15 @@
make.cppConfigs(prj)
test.capture [[
ifeq ($(config),debug)
CC = clang
CXX = clang++
AR = ar
ifeq ($(origin CC), default)
CC = clang
endif
ifeq ($(origin CXX), default)
CXX = clang++
endif
ifeq ($(origin AR), default)
AR = ar
endif
]]
end