diff options
Diffstat (limited to 'BuildTools/SCons/SConstruct')
-rw-r--r-- | BuildTools/SCons/SConstruct | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index 6d63d5b..78f388b 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -9,5 +9,5 @@ root = Dir("../..").abspath oldSConscript = SConscript -def SConscript(*arguments, **keywords) : - if not keywords.get("test_only", False) or env["TEST"] : - return apply(oldSConscript, arguments, keywords) +def SConscript(*args, **kwargs) : + if not kwargs.get("test_only", False) or env["TEST"] : + return oldSConscript(*args, **kwargs) env.SConscript = SConscript @@ -144,3 +144,3 @@ conf = Configure(conf_env, custom_tests = { if not conf.CheckCXX() or not conf.CheckCC() : - print "Error: You need a working compiler" + print("Error: You need a working compiler") Exit(1) @@ -148,3 +148,3 @@ if not conf.CheckCXX() or not conf.CheckCC() : if not conf.CheckCpp11Support() : - print "Error: You need a compiler with support for the C++11 standard" + print("Error: You need a compiler with support for the C++11 standard") Exit(1) @@ -172,3 +172,3 @@ if zlib_okay : elif not env.get("zlib_bundled_enable", True) : - print "Error: Zlib not found and zlib_bundled_enable is false" + print("Error: Zlib not found and zlib_bundled_enable is false") Exit(1) @@ -240,3 +240,3 @@ if not env.get("boost_force_bundled") and allLibsPresent : elif not env.get("boost_bundled_enable", True) : - print "Error: Boost not found and boost_bundled_enable is false" + print("Error: Boost not found and boost_bundled_enable is false") Exit(1) @@ -375,3 +375,3 @@ bundledExpat = False if not env.get("HAVE_EXPAT", 0) and not env.get("HAVE_LIBXML", 0) : - print "Expat or LibXML not found. Using bundled Expat" + print("Expat or LibXML not found. Using bundled Expat") SConscript("#/3rdParty/Expat/SConscript") @@ -426,6 +426,6 @@ if not env.get("HAVE_ICU", False) and not env.get("HAVE_LIBIDN", False) : elif env.get("need_idn", True): - print "Error: ICU and LIBIDN not found, and libidn_bundled_enable is false" + print("Error: ICU and LIBIDN not found, and libidn_bundled_enable is false") Exit(1) else: - print "Proceeding without an IDN library because need_idn was false. This will break all internal binaries" + print("Proceeding without an IDN library because need_idn was false. This will break all internal binaries") @@ -516,3 +516,3 @@ if not env.get("lua_force_bundled", False) and conf.CheckLibWithHeader(env["lua_ else : - print "Warning: Unable to determine Lua version. Not installing Lua libraries." + print("Warning: Unable to determine Lua version. Not installing Lua libraries.") env["LUA_FLAGS"].update(lua_flags) @@ -556,2 +556,6 @@ if env["qt"] : +if env["PLATFORM"] == "win32" : + systemIncludeFlag = "/I" +else: + systemIncludeFlag = "-isystem" @@ -585,5 +589,5 @@ elif env.get("tls_backend") == "openssl" : if openssl_include: - openssl_flags = {"CPPPATH":[openssl_include]} + openssl_flags = { "CPPFLAGS": [systemIncludeFlag + openssl_include]} else: - openssl_flags = { "CPPPATH": [os.path.join(openssl_prefix, "include")] } + openssl_flags = { "CPPFLAGS": [systemIncludeFlag + os.path.join(openssl_prefix, "include")] } if openssl_libdir: @@ -668,3 +672,3 @@ except SCons.Errors.StopError: except Exception as e: - print "Info: %s" % str(e) + print("Info: %s" % str(e)) env["HAVE_QT"] = False @@ -690,3 +694,3 @@ try: except TypeError: - print "You seem to be using Swift in a Git submodule. Not installing hooks." + print("You seem to be using Swift in a Git submodule. Not installing hooks.") @@ -705,2 +709,4 @@ if ARGUMENTS.get("replace_pragma_once", False) : for actual_root, dirs, files in os.walk(root) : + dirs.sort() + files.sort() if "3rdParty" in actual_root : @@ -731,3 +737,3 @@ modules = [] if os.path.isdir(Dir("#/3rdParty").abspath) : - for dir in os.listdir(Dir("#/3rdParty").abspath) : + for dir in sorted(os.listdir(Dir("#/3rdParty").abspath)) : full_dir = os.path.join(Dir("#/3rdParty").abspath, dir) @@ -738,3 +744,3 @@ if os.path.isdir(Dir("#/3rdParty").abspath) : modules.append("3rdParty/" + dir) -for dir in os.listdir(Dir("#").abspath) : +for dir in sorted(os.listdir(Dir("#").abspath)) : full_dir = os.path.join(Dir("#").abspath, dir) @@ -754,3 +760,3 @@ for stage in ["flags", "build"] : env["SCONS_STAGE"] = stage - SConscript(dirs = map(lambda x : root + "/" + x, modules)) + SConscript(dirs = list(map(lambda x : root + "/" + x, modules))) @@ -766,5 +772,5 @@ if ARGUMENTS.get("sloccount", False) : -print -print " Build Configuration" -print " -------------------" +print("") +print(" Build Configuration") +print(" -------------------") @@ -777,12 +783,12 @@ if env.get("HAVE_EXPAT", 0): parsers.append("(Bundled)") -print " Projects: " + ' '.join(env["PROJECTS"]) -print "" -print " XML Parsers: " + ' '.join(parsers) +print(" Projects: " + ' '.join(env["PROJECTS"])) +print("") +print(" XML Parsers: " + ' '.join(parsers)) -print " TLS Support: " + (env.get("HAVE_OPENSSL",0) and "OpenSSL" or env.get("HAVE_SECURETRANSPORT",0) and "Secure Transport" or env.get("HAVE_SCHANNEL", 0) and "Schannel" or "Disabled") -print " DNSSD Support: " + (env.get("HAVE_BONJOUR") and "Bonjour" or (env.get("HAVE_AVAHI") and "Avahi" or "Disabled")) -print +print(" TLS Support: " + (env.get("HAVE_OPENSSL",0) and "OpenSSL" or env.get("HAVE_SECURETRANSPORT",0) and "Secure Transport" or env.get("HAVE_SCHANNEL", 0) and "Schannel" or "Disabled")) +print(" DNSSD Support: " + (env.get("HAVE_BONJOUR") and "Bonjour" or (env.get("HAVE_AVAHI") and "Avahi" or "Disabled"))) +print("") if not GetOption("help") and not env.get("HAVE_OPENSSL", 0) and not env.get("HAVE_SCHANNEL", 0) and not env.get("HAVE_SECURETRANSPORT", 0): - print "Error: A working TLS backend is required. Please check the documentation for more information." + print("Error: A working TLS backend is required. Please check the documentation for more information.") Exit(1) |