Skip to content

Commit

Permalink
Allow implicit float to int conversions in sol2
Browse files Browse the repository at this point in the history
tolua was implicitly converting floats to ints, but sol2 chokes on this. For
backward compatibility and to fix our own rulesets, disable this check in sol.

Closes #1161.
  • Loading branch information
lmoureaux committed Aug 2, 2022
1 parent 54f6c38 commit f960d8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dependencies/sol2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
add_library(sol2 INTERFACE)
target_compile_definitions(sol2 INTERFACE SOL_ALL_SAFETIES_ON=1)
target_compile_definitions(sol2 INTERFACE
SOL_ALL_SAFETIES_ON=1
# Allow float -> int conversions
SOL_NO_CHECK_NUMBER_PRECISION=1)
target_include_directories(sol2 INTERFACE "${CMAKE_CURRENT_LIST_DIR}")

0 comments on commit f960d8e

Please sign in to comment.