summaryrefslogtreecommitdiffstats
path: root/SConstruct
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-03-20 18:19:27 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-05-04 15:56:35 +0300
commite06d5cd41406f13d390ac77580096652d987b7ae (patch)
tree990716b3361275351d3a52bbbd00732c64bda376 /SConstruct
parentf262ae9a6f01be8da4ee351f27d5d300674373a7 (diff)
downloadredot-cpp-e06d5cd41406f13d390ac77580096652d987b7ae.tar.gz
Add double precision build support.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct4
1 files changed, 4 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index a735709..b783156 100644
--- a/SConstruct
+++ b/SConstruct
@@ -139,6 +139,7 @@ opts.Add(
opts.Add(BoolVariable("generate_template_get_node", "Generate a template version of the Node class's get_node.", True))
opts.Add(BoolVariable("build_library", "Build the godot-cpp library.", True))
+opts.Add(EnumVariable("float", "Floating-point precision", "32", ("32", "64")))
opts.Update(env)
Help(opts.GenerateHelpText(env))
@@ -171,6 +172,9 @@ else:
if env["target"] == "debug":
env.Append(CPPDEFINES=["DEBUG_ENABLED", "DEBUG_METHODS_ENABLED"])
+if env["float"] == "64":
+ env.Append(CPPDEFINES=["REAL_T_IS_DOUBLE"])
+
if env["platform"] == "linux" or env["platform"] == "freebsd":
if env["use_llvm"]:
env["CXX"] = "clang++"