Improve compiler selection

feature/quick-start-py
kaetemi 3 years ago
parent 88631d8570
commit d5474ae8ca
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -19,13 +19,19 @@
},
"Toolchain": {
"Preference": [
"MSVC/v143/x64",
"MSVC/v142/x64",
"MSVC/v141/x64",
"MSVC/v140/x64",
"MSVC/v90/x86",
"MSVC/v100/x86",
"MSVC/v80/x86"
"Win7/VS/v143/x64",
"Win7/VS/v142/x64",
"Win7/VS/v141/x64",
"Win7/VS/v140/x64",
"Win7/VS/v120/x64",
"Win7/VS/v110/x64",
"Win2k/VS/v90/x86",
"WinXP/VS/v141_xp/x86",
"WinXP/VS/v140_xp/x86",
"WinXP/VS/v120_xp/x86",
"WinXP/VS/v110_xp/x86",
"WinXP/VS/v100/x86",
"Win98/VS/v80/x86"
],
"Server": { "OS": "Ubuntu20" },
"Options": [

@ -29,6 +29,7 @@ for ts in SortedToolsets:
# https://cmake.org/cmake/help/latest/generator/Visual%20Studio%208%202005.html
# Must set VCVars ahead of compiling!
toolchain["Generator"] = "NMake Makefiles"
toolchain["DisplayName"] = vs["DisplayName"]
toolchain["Platform"] = platform
toolchain["Toolset"] = ts
toolchain["Prefix"] = FindVSPrefixPaths(ts, platform)
@ -50,13 +51,24 @@ for ts in SortedToolsets:
if luaVersion:
toolchain["LuaVersion"] = luaVersion
if platform == "x64":
toolchain["OS"] = "Win64"
toolchain["VCVars"] = FindVCVars64(vs["Path"])
else:
toolchain["OS"] = "Win32"
toolchain["VCVars"] = FindVCVars32(vs["Path"])
if vs["Version"] >= 11:
if toolchain["Toolset"].endswith("_xp"):
toolchain["OS"] = "WinXP"
else:
toolchain["OS"] = "Win7"
elif vs["Version"] >= 10:
toolchain["OS"] = "WinXP"
elif vs["Version"] >= 9:
toolchain["OS"] = "Win2k"
elif vs["Version"] >= 8:
toolchain["OS"] = "Win98"
else:
continue
if toolchain["VCVars"] and (len(toolchain["Prefix"]) or "Hunter" in toolchain):
Toolchains["MSVC/" + ts + "/" + platform] = toolchain
Toolchains[toolchain["OS"] + "/VS/" + ts + "/" + platform] = toolchain
with open(os.path.join(NeLConfigDir, "toolchains_default.json"), 'w') as fo:
json.dump(Toolchains, fo, indent=2)

@ -140,6 +140,8 @@ def FindLuaVersion(prefixPaths):
return int(vers)
line = fi.readline()
fi.close()
# TODO: For linux, if hunter, don't care,
# otherwise, detect which lua version the system luabind depends on!
return
# end of file

@ -26,8 +26,16 @@ def FindToolchain(filter):
res = tsn
return res
NeLToolchainWin32 = FindToolchain({ "OS": "Win32" })
NeLToolchainWin64 = FindToolchain({ "OS": "Win64" })
NeLToolchainWin32 = FindToolchain({ "OS": "Win98", "Platform": "x86" })
if not NeLToolchainWin32:
NeLToolchainWin32 = FindToolchain({ "OS": "Win2k", "Platform": "x86" })
if not NeLToolchainWin32:
NeLToolchainWin32 = FindToolchain({ "OS": "WinXP", "Platform": "x86" })
if not NeLToolchainWin32:
NeLToolchainWin32 = FindToolchain({ "OS": "Win7", "Platform": "x86" })
NeLToolchainWin64 = FindToolchain({ "OS": "WinXP", "Platform": "x64" })
if not NeLToolchainWin64:
NeLToolchainWin64 = FindToolchain({ "OS": "Win7", "Platform": "x64" })
NeLToolchainServer = FindToolchain(NeLConfig["Toolchain"]["Server"])
print("Win32:")

Loading…
Cancel
Save