-
-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{cmake} FLOAT_PRECISION should be GODOT_FLOAT_PRECISION & added to the target #1145
Conversation
6e91dda
to
c1b9587
Compare
c1b9587
to
f7eb931
Compare
…e target All top-level CMake options should be prefixed with GODOT_ so as not to "pollute the environment" when included in other projects. Adding it to the target as PUBLIC will propagate it to any projects including godot-cpp.
f7eb931
to
0e4fe86
Compare
bump |
@asmaloney Can you rebase the git pull request? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The general flow looks good to me, but needs a rebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rename part of this PR has been superseded by PR #1583.
if("${GODOT_FLOAT_PRECISION}" STREQUAL "double") | ||
target_compile_definitions( ${PROJECT_NAME} PUBLIC | ||
REAL_T_IS_DOUBLE | ||
) | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed anymore now that we have this code?
set(GODOT_PRECISION "single" CACHE STRING "Set the floating-point precision level (single|double)")
if ("${GODOT_PRECISION}" STREQUAL "double")
add_definitions(-DREAL_T_IS_DOUBLE)
endif()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right, this is no longer needed
Thanks! However, it looks like this was fixed by another PR |
All top-level CMake options should be prefixed with GODOT_ so as not to "pollute the environment" when included in other projects.
Adding it to the target as
PUBLIC
will propagate it to any projects including godot-cpp.