Skip to content

Commit

Permalink
fix precise build
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Oct 13, 2015
1 parent 0f9a08e commit f51d1fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/core/CMakeLists.txt
Expand Up @@ -327,6 +327,11 @@ SET(QGIS_CORE_SRCS
geometry/qgswkbtypes.cpp
)

CHECK_CXX_SOURCE_COMPILES("#include <cmath>\nint main() { double d = std::round (0.3); return 0; }\n" HAVE_STD_ROUND)
IF(HAVE_STD_ROUND)
ADD_DEFINITIONS(-DHAVE_STD_ROUND)
ENDIF(HAVE_STD_ROUND)

FILE(GLOB JSON_HELP_FILES "${CMAKE_SOURCE_DIR}/resources/function_help/json/*")
STRING(REPLACE "$" "$$" JSON_HELP_FILES "${JSON_HELP_FILES}")
STRING(REPLACE "\(" "\\(" JSON_HELP_FILES "${JSON_HELP_FILES}")
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgsgeos.cpp
Expand Up @@ -49,7 +49,7 @@ email : marco.hugentobler at sourcepole dot com
return r; \
}

#if defined(_MSC_VER) && (_MSC_VER < 1800)
#ifndef HAVE_STD_ROUND
namespace std
{
double round( double d )
Expand Down

0 comments on commit f51d1fb

Please sign in to comment.