[geos-devel] [GEOS] #674: VoronoiDiagramBuilder uses fmax which breaks MSVC11 build
GEOS
geos-trac at osgeo.org
Tue Nov 19 03:03:31 PST 2013
#674: VoronoiDiagramBuilder uses fmax which breaks MSVC11 build
-------------------------+--------------------------------------------------
Reporter: Twiddeldidu | Owner: geos-devel@…
Type: defect | Status: new
Priority: major | Milestone: 3.4.3
Component: Default | Version: svn-trunk
Severity: Unassigned | Keywords: msvc
-------------------------+--------------------------------------------------
The build configuration already has defined NOMINMAX in the CMakeLists.txt
but there is still a compiling issue with msvc11 (x64) and CMake.
{{{
elseif(MSVC)
# Set pedantic mode by default
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
string(REGEX REPLACE "/W[0-9]" "/W4" CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS}")
if(MSVC80 OR MSVC90 OR MSVC10 OR MSVC11)
# Option is to enable the /MP switch for Visual Studio 2005 or later
option(GEOS_MSVC_ENABLE_MP
"Set to ON to build GEOS with the /MP option (Visual Studio 2005 and
above)." ON)
mark_as_advanced(GEOS_MSVC_ENABLE_MP)
if(GEOS_MSVC_ENABLE_MP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
message(STATUS "Setting Visual Studio 2005+ option /MP to
${GEOS_MSVC_ENABLE_MP}")
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
== add_definitions(-DNOMINMAX) ==
endif()
endif()
}}}
There is a problem with '''VoronoiDiagramBuilder.cpp''' because it uses
fmax. I made a quick patch changing this to the generic std::max instead
of using fmax.
--
Ticket URL: <http://trac.osgeo.org/geos/ticket/674>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
More information about the geos-devel
mailing list