diff --git a/makefile b/makefile index f67822d2d9d..06934fe6726 100644 --- a/makefile +++ b/makefile @@ -21,6 +21,9 @@ endif ifdef CC PARAMS+= --CC='$(CC)' endif +ifdef CXX +PARAMS+= --CXX='$(CXX)' +endif ifdef LD PARAMS+= --LD='$(LD)' endif diff --git a/scripts/genie.lua b/scripts/genie.lua index 8e74b353c32..783ffbdb1b1 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -109,6 +109,11 @@ newoption { description = "CC replacement", } +newoption { + trigger = "CXX", + description = "CXX replacement", +} + newoption { trigger = "LD", description = "LD replacement", diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index 0c88c55fb8b..4ed7aade12b 100644 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -333,8 +333,11 @@ function toolchain(_buildDir) if (_OPTIONS["CC"] ~= nil) then premake.gcc.cc = _OPTIONS["CC"] end + if (_OPTIONS["CXX"] ~= nil) then + premake.gcc.cxx = _OPTIONS["CXX"] + end if (_OPTIONS["LD"] ~= nil) then - premake.gcc.cxx = _OPTIONS["LD"] + premake.gcc.ld = _OPTIONS["LD"] end configuration {} -- reset configuration