summaryrefslogtreecommitdiffstats
path: root/tools/windows.py
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-07-04 17:50:54 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-07-04 18:00:29 +0200
commit7901986dcf78338e453e44f010a22af361554aaa (patch)
tree950dfa1036e9f39d3b635eabcb8b572b9d65a2a9 /tools/windows.py
parent794dea0dd75ed6e914a5d774d728c2eb670656cc (diff)
downloadredot-cpp-7901986dcf78338e453e44f010a22af361554aaa.tar.gz
[SCons] Fix msvc, linux-clang, add version check.
Diffstat (limited to 'tools/windows.py')
-rw-r--r--tools/windows.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/windows.py b/tools/windows.py
index 40d7712..b471aa0 100644
--- a/tools/windows.py
+++ b/tools/windows.py
@@ -1,7 +1,8 @@
import sys
import my_spawn
-from SCons.Tool.MSCommon import msvc_exists
+
+from SCons.Tool import msvc, mingw
from SCons.Variables import *
@@ -15,14 +16,13 @@ def exists(env):
def generate(env):
base = None
- if not env["use_mingw"] and msvc_exists(env):
- base = env.Tool("msvc")
- env["is_msvc"] = True
+ if not env["use_mingw"] and msvc.exists(env):
if env["arch"] == "x86_64":
env["TARGET_ARCH"] = "amd64"
elif env["arch"] == "x86_32":
env["TARGET_ARCH"] = "x86"
- base.generate(env)
+ env["is_msvc"] = True
+ msvc.generate(env)
env.Append(CPPDEFINES=["TYPED_METHOD_BIND"])
env.Append(LINKFLAGS=["/WX"])
if env["target"] == "debug":
@@ -32,8 +32,7 @@ def generate(env):
elif sys.platform == "win32" or sys.platform == "msys":
env["use_mingw"] = True
- base = env.Tool("mingw")
- base.generate(env)
+ mingw.generate(env)
# Still need to use C++17.
env.Append(CCFLAGS=["-std=c++17"])
# Don't want lib prefixes