Skip to content

Commit

Permalink
Check that precision of extension_api.json matches build options
Browse files Browse the repository at this point in the history
  • Loading branch information
dsnopek committed Feb 21, 2025
1 parent 5eb6e6b commit 93b484e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/godotcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ def scons_generate_bindings(target, source, env):

api = generate_trimmed_api(str(source[0]), profile_filepath)

if "precision" in api["header"] and env["precision"] != api["header"]["precision"]:
raise UserError(
f"Cannot do a precision={env['precision']} build using '{str(source[0])}' which was generated by a Godot built with precision={api['header']['precision']}"
)

_generate_bindings(
api,
env["generate_template_get_node"],
Expand Down

0 comments on commit 93b484e

Please sign in to comment.