Fix single-precision (mjUSESINGLE) CMake builds.
PiperOrigin-RevId: 947367737 Change-Id: If2b56c9d4b4c214c858f6d8b588443f6bd4896ee
This commit is contained in:
committed by
Copybara-Service
parent
9b053d68e9
commit
6afe13573b
@@ -200,7 +200,12 @@ if(CMAKE_POLICY_VERSION_MINIMUM_LOCALLY_DEFINED)
|
||||
unset(CMAKE_POLICY_VERSION_MINIMUM_LOCALLY_DEFINED)
|
||||
endif()
|
||||
|
||||
set(ENABLE_DOUBLE_PRECISION ON)
|
||||
# build ccd in single precision when MuJoCo is built with mjUSESINGLE
|
||||
if(CMAKE_C_FLAGS MATCHES "mjUSESINGLE")
|
||||
set(ENABLE_DOUBLE_PRECISION OFF)
|
||||
else()
|
||||
set(ENABLE_DOUBLE_PRECISION ON)
|
||||
endif()
|
||||
set(CCD_HIDE_ALL_SYMBOLS ON)
|
||||
|
||||
# Patch changes in https://github.com/danfis/libccd/pull/83.patch
|
||||
|
||||
Reference in New Issue
Block a user