mirror of
https://github.com/godotengine/godot-cpp.git
synced 2025-12-31 01:48:45 +03:00
Merge pull request #988 from rburing/precision=double
Rename `float=64` build option to `precision=double`
This commit is contained in:
@@ -122,7 +122,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.Add(EnumVariable("precision", "Set the floating-point precision level", "single", ("single", "double")))
|
||||
|
||||
# Add platform options
|
||||
tools = {}
|
||||
@@ -204,7 +204,7 @@ if env.get("is_msvc", False):
|
||||
else:
|
||||
env.Append(CXXFLAGS=["-std=c++17"])
|
||||
|
||||
if env["float"] == "64":
|
||||
if env["precision"] == "double":
|
||||
env.Append(CPPDEFINES=["REAL_T_IS_DOUBLE"])
|
||||
|
||||
# Generate bindings
|
||||
@@ -239,7 +239,7 @@ sources.extend([f for f in bindings if str(f).endswith(".cpp")])
|
||||
suffix = ".{}.{}".format(env["platform"], env["target"])
|
||||
if env.dev_build:
|
||||
suffix += ".dev"
|
||||
if env["float"] == "64":
|
||||
if env["precision"] == "double":
|
||||
suffix += ".double"
|
||||
suffix += "." + env["arch"]
|
||||
if env["ios_simulator"]:
|
||||
|
||||
Reference in New Issue
Block a user