Compare commits

...
5 Commits
Author SHA1 Message Date
Kristian EversandMike Taves 2f3dcce640 Avoid using upper case project name in doc install dir (#3299)
Closes #3296 

Co-authored-by: Mike Taves <mwtoews@gmail.com>
2022-08-28 12:35:24 +02:00
Even Rouault cc8970d96e Merge pull request #3305 from OSGeo/backport-3300-to-9.1
[Backport 9.1] JSON output: avoid rounding issues with integer values in a double on…
2022-08-27 18:12:16 +02:00
Even Rouault 6e791c10d5 Merge pull request #3300 from rouault/fix_3297
JSON output: avoid rounding issues with integer values in a double on…
2022-08-27 15:37:15 +00:00
Kristian Evers 7d3c2425cc Merge pull request #3303 from OSGeo/backport-3302-to-9.1
[Backport 9.1] CMake: fix symbol detection when CFLAGS includes -Werror=something (fixes #3295)
2022-08-27 15:45:34 +02:00
Even Rouault ea151cd98b Merge pull request #3302 from rouault/fix_3295
CMake: fix symbol detection when CFLAGS includes -Werror=something (fixes #3295)
2022-08-27 13:05:57 +00:00
3 changed files with 25 additions and 1 deletions
+13
View File
@@ -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")
################################################################################
+3 -1
View File
@@ -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()
+9
View File
@@ -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];