summarylogtreecommitdiffstats
path: root/geos-3.5.0.patch
blob: c873b5a7fa63d635f0394096b6e4ae845c13d3f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
diff -Naur geos-3.6.2.orig/CMakeLists.txt geos-3.6.2/CMakeLists.txt
--- geos-3.6.2.orig/CMakeLists.txt	2018-05-23 19:46:15.542316000 -0400
+++ geos-3.6.2/CMakeLists.txt	2018-05-23 20:36:33.943193000 -0400
@@ -116,7 +116,7 @@
     "Forcing IEEE 754 using flag -ffloat-store - ${GEOS_ENABLE_FLOATSTORE}")
 
   # Warnings specification
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -fno-implicit-inline-templates -Wconversion -pedantic -W -Wunused -Wuninitialized -Wextra -Wdouble-promotion")
+  #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -fno-implicit-inline-templates -Wconversion -pedantic -W -Wunused -Wuninitialized -Wextra -Wdouble-promotion")
 
   # Turn on Position Independent Code generation for GEOS C shared library
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -Wconversion -pedantic -Wmissing-prototypes -W -Wunused -Wuninitialized -Wextra -Wdouble-promotion")
@@ -191,7 +191,10 @@
 include(CheckPrototypeExists)
 include(CheckSymbolExists)
 
-check_prototype_exists(isnan cmath HAVE_STD_ISNAN)
+check_cxx_source_compiles(
+  "#include <cmath>
+  int main() { double x=0.1; return std::isnan(x)?1:0; }"
+  HAVE_STD_ISNAN)
 if(NOT HAVE_STD_ISNAN)
   if(MSVC)
     check_prototype_exists(_isnan float.h HAVE_ISNAN)
@@ -205,7 +208,10 @@
   endif()
 endif()
 
-check_prototype_exists(isfinite cmath HAVE_STD_ISFINITE)
+check_cxx_source_compiles(
+  "#include <cmath>
+  int main() { double x=0.1; return std::isfinite(x)?1:0; }"
+  HAVE_STD_ISFINITE)
 
 if(NOT HAVE_STD_ISFINITE)
   if(MSVC)
@@ -347,7 +353,7 @@
     DESTINATION "${PROJECT_BINARY_DIR}")
 endif()
 
-include(GenerateSourceGroups)
+#include(GenerateSourceGroups)
 
 # Enable target debugging for CMake Tools in Visual Studio Code
 # https://github.com/vector-of-bool/vscode-cmake-tools
diff -Naur geos-3.6.2.orig/include/CMakeLists.txt geos-3.6.2/include/CMakeLists.txt
--- geos-3.6.2.orig/include/CMakeLists.txt	2018-05-23 19:46:15.521315800 -0400
+++ geos-3.6.2/include/CMakeLists.txt	2018-05-23 20:37:32.614369700 -0400
@@ -54,4 +54,4 @@
 #################################################################################
 # Group source files for IDE source explorers (e.g. Visual Studio)
 #################################################################################
-GenerateSourceGroups(include)
+#GenerateSourceGroups(include)
diff -Naur geos-3.6.2.orig/src/CMakeLists.txt geos-3.6.2/src/CMakeLists.txt
--- geos-3.6.2.orig/src/CMakeLists.txt	2018-05-23 19:46:15.848312300 -0400
+++ geos-3.6.2/src/CMakeLists.txt	2018-05-23 20:37:52.022699800 -0400
@@ -105,4 +105,4 @@
 #################################################################################
 # Group source files for IDE source explorers (e.g. Visual Studio)
 #################################################################################
-GenerateSourceGroups(src)
+#GenerateSourceGroups(src)
diff -Naur geos-3.6.2.orig/tests/unit/CMakeLists.txt geos-3.6.2/tests/unit/CMakeLists.txt
--- geos-3.6.2.orig/tests/unit/CMakeLists.txt	2018-05-23 19:46:14.736324600 -0400
+++ geos-3.6.2/tests/unit/CMakeLists.txt	2018-05-23 20:38:21.110716300 -0400
@@ -38,4 +38,4 @@
 #################################################################################
 # Group source files for IDE source explorers (e.g. Visual Studio)
 #################################################################################
-GenerateSourceGroups(tests/unit)
+#GenerateSourceGroups(tests/unit)
--- geos-3.7.0/include/geos/platform.h.cmake.orig	2018-11-03 11:54:44.643131100 +0300
+++ geos-3.7.0/include/geos/platform.h.cmake	2018-11-03 11:57:49.714716600 +0300
@@ -31,6 +31,9 @@
 
 /* Set to 1 if you have ieeefp.h */
 #cmakedefine HAVE_IEEEFP_H 1
+
+#cmakedefine HAVE_STD_ISFINITE 1
+#cmakedefine HAVE_STD_ISNAN 1
 
 #ifdef _MSC_VER
 #  define _USE_MATH_DEFINES
@@ -66,10 +66,14 @@
 #  endif
 #else
 #  include <ieeefp.h>
-#  ifndef FINITE
+#  if defined(HAVE_STD_ISFINITE)
+#    define FINITE(x) std::isfinite(x)
+#  elif !defined(FINITE)
 #    define FINITE(x) finite(x)
 #  endif
-#  ifndef ISNAN
+#  if defined(HAVE_STD_ISNAN)
+#    define ISNAN(x) std::isnan(x)
+#  elif !defined(ISNAN)
 #    define ISNAN(x) isnan(x)
 #  endif
 #endif