Skip to content

Commit f51d1fb

Browse files
committedOct 13, 2015
fix precise build
1 parent 0f9a08e commit f51d1fb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
 

‎src/core/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,11 @@ SET(QGIS_CORE_SRCS
327327
geometry/qgswkbtypes.cpp
328328
)
329329

330+
CHECK_CXX_SOURCE_COMPILES("#include <cmath>\nint main() { double d = std::round (0.3); return 0; }\n" HAVE_STD_ROUND)
331+
IF(HAVE_STD_ROUND)
332+
ADD_DEFINITIONS(-DHAVE_STD_ROUND)
333+
ENDIF(HAVE_STD_ROUND)
334+
330335
FILE(GLOB JSON_HELP_FILES "${CMAKE_SOURCE_DIR}/resources/function_help/json/*")
331336
STRING(REPLACE "$" "$$" JSON_HELP_FILES "${JSON_HELP_FILES}")
332337
STRING(REPLACE "\(" "\\(" JSON_HELP_FILES "${JSON_HELP_FILES}")

‎src/core/geometry/qgsgeos.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ email : marco.hugentobler at sourcepole dot com
4949
return r; \
5050
}
5151

52-
#if defined(_MSC_VER) && (_MSC_VER < 1800)
52+
#ifndef HAVE_STD_ROUND
5353
namespace std
5454
{
5555
double round( double d )

0 commit comments

Comments
 (0)
Please sign in to comment.