Skip to content

Commit 7576f18

Browse files
author
Tor Didriksen
committed
Bug#20259578 MAIN.GIS-PRECISE FAILS IN EMBEDDED MODE ON 32-BIT PLATFORMS
On 32-bit platforms sqrt(nan) and/or sqrt(-nan) returns a finite value instead of nan/-nan. Fix: implement a workaround for call to std::sqrt within the boost::geometry::math namespace
1 parent 1772906 commit 7576f18

File tree

3 files changed

+406
-1
lines changed

3 files changed

+406
-1
lines changed

cmake/boost.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,8 @@ MESSAGE(STATUS "BOOST_INCLUDE_DIR ${BOOST_INCLUDE_DIR}")
263263

264264
# We have a limited set of patches/bugfixes here:
265265
SET(BOOST_PATCHES_DIR "${CMAKE_SOURCE_DIR}/include/boost_1_57_0")
266+
267+
# Bug in sqrt(NaN) on 32bit platforms
268+
IF(SIZEOF_VOIDP EQUAL 4)
269+
ADD_DEFINITIONS(-DBOOST_GEOMETRY_SQRT_CHECK_FINITENESS)
270+
ENDIF()

0 commit comments

Comments
 (0)