Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f3dcce640 | ||
|
|
cc8970d96e | ||
|
|
6e791c10d5 | ||
|
|
7d3c2425cc | ||
|
|
ea151cd98b |
@@ -291,7 +291,20 @@ link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
|
||||
# Installation
|
||||
################################################################################
|
||||
include(ProjInstallPath)
|
||||
|
||||
# By default GNUInstallDirs will use the upper case project name
|
||||
# for CMAKE_INSTALL_DOCDIR, resulting in something like share/doc/PROJ
|
||||
# instead of share/doc/proj which historically have been the path used
|
||||
# by the project.
|
||||
# Here force the use of a lower case project name and reset after
|
||||
# GNUInstallDirs has done its thing
|
||||
set(PROJECT_NAME_ORIGINAL "${PROJECT_NAME}")
|
||||
string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(PROJECT_NAME "${PROJECT_NAME_ORIGINAL}")
|
||||
|
||||
set(PROJ_DATA_PATH "${CMAKE_INSTALL_FULL_DATADIR}/proj")
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -13,7 +13,9 @@ include(CheckFunctionExists)
|
||||
# if C flags have -Werror, temporarily remove these while running some checks
|
||||
string(FIND "${CMAKE_C_FLAGS}" "-Werror" FIND_WERROR)
|
||||
if(FIND_WERROR GREATER_EQUAL 0)
|
||||
string(REPLACE "-Werror" "" _tmp_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
|
||||
# we must be careful about not matching -Werror=something, so let's append
|
||||
# a space at the end of CMAKE_C_FLAGS and match -Werror with a trailing space
|
||||
string(REPLACE "-Werror " " " _tmp_CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ")
|
||||
set(_prev_CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_C_FLAGS "${_tmp_CMAKE_C_FLAGS}")
|
||||
endif()
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
/*! @cond Doxygen_Suppress */
|
||||
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
@@ -277,6 +278,14 @@ void CPLJSonStreamingWriter::Add(double dfVal, int nPrecision)
|
||||
{
|
||||
Print( dfVal > 0 ? "\"Infinity\"" : "\"-Infinity\"" );
|
||||
}
|
||||
else if( dfVal >= std::numeric_limits<int>::min() &&
|
||||
dfVal <= std::numeric_limits<int>::max() &&
|
||||
static_cast<int>(dfVal) == dfVal )
|
||||
{
|
||||
// Avoid rounding issues on some platforms like armel, with numbers
|
||||
// like 2005. See https://github.com/OSGeo/PROJ/issues/3297
|
||||
Print(CPLSPrintf("%d", static_cast<int>(dfVal)));
|
||||
}
|
||||
else
|
||||
{
|
||||
char szFormatting[10];
|
||||
|
||||
Reference in New Issue
Block a user