diff options
| author | Tobias Markmann <tm@ayena.de> | 2015-05-04 09:54:10 (GMT) | 
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2015-05-04 09:54:10 (GMT) | 
| commit | 430f8e3d2f7afac17f51d37bf502586dc2dc32cc (patch) | |
| tree | f3eeafdf87551a4a8035c3b52151f4e108ecdc9a | |
| parent | e53da0d1bc137df591fa4e97261a55daef8f2905 (diff) | |
| download | swift-430f8e3d2f7afac17f51d37bf502586dc2dc32cc.zip swift-430f8e3d2f7afac17f51d37bf502586dc2dc32cc.tar.bz2 | |
Correctly handle full paths when detecting Clang/GCC compilers
Test-Information:
Tested behavior on Elementary OS 0.2.1.
Change-Id: I887b85b78bfe5210844e0ea31f496fdbc8c21fa0
| -rw-r--r-- | 3rdParty/LibNATPMP/SConscript | 4 | ||||
| -rw-r--r-- | BuildTools/SCons/SConstruct | 2 | 
2 files changed, 4 insertions, 2 deletions
| diff --git a/3rdParty/LibNATPMP/SConscript b/3rdParty/LibNATPMP/SConscript index 273c2d2..2a58242 100644 --- a/3rdParty/LibNATPMP/SConscript +++ b/3rdParty/LibNATPMP/SConscript @@ -1,5 +1,7 @@  Import(["env", "conf_env"]) +import os +  if env.get("LIBNATPMP_BUNDLED", False) :  ################################################################################ @@ -12,7 +14,7 @@ if env.get("LIBNATPMP_BUNDLED", False) :  				"LIBPATH": [Dir(".")],  				"INTERNAL_CPPDEFINES": ["STATICLIB"],  			} -		if env["CC"] in ("clang", "gcc") : +		if os.path.basename(env["CC"]) in ("clang", "gcc") :  			env["LIBNATPMP_FLAGS"].update({"CPPFLAGS": ["-isystem" "3rdParty/LibNATPMP/src/libnatpmp"]})  		else :  			env["LIBNATPMP_FLAGS"].update({"CPPPATH": [Dir("src/libnatpmp")]}) diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index 6813747..9fba359 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -298,7 +298,7 @@ if env.get("try_libxml", True) and not env.get("HAVE_LIBXML", 0) :  #	and conf.CheckVersion("LibXML", "2.6.23", "LIBXML_VERSION", "libxml/xmlversion.h", 20623):  		env["HAVE_LIBXML"] = 1  		libxml_env.Append() -		if env["CC"] in ("clang", "gcc"): +		if os.path.basename(env["CC"]) in ("clang", "gcc"):  			env["LIBXML_FLAGS"] = { "CXXFLAGS": ["-isystem/usr/include/libxml2"], "LIBS": ["xml2"] }  		else:  			env["LIBXML_FLAGS"] = { "CPPPATH": ["/usr/include/libxml2"], "LIBS": ["xml2"] } | 
 Swift
 Swift