-
Notifications
You must be signed in to change notification settings - Fork 0
/
xerces-c.patch
177 lines (162 loc) · 5.34 KB
/
xerces-c.patch
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bee6cd581..dbd9a9b37 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,7 +106,7 @@ include(XercesIncludes)
include(XercesFunctions)
include(XercesDLL)
include(XercesPathDelimiters)
-include(XercesICU)
+# include(XercesICU)
include(XercesMutexMgrSelection)
include(XercesNetAccessorSelection)
include(XercesMsgLoaderSelection)
@@ -171,7 +171,7 @@ message(STATUS " Installation directory: ${prefix}")
message(STATUS " C compiler: ${CMAKE_C_COMPILER}")
message(STATUS " C++ compiler: ${CMAKE_CXX_COMPILER}")
message(STATUS "")
-message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}")
+message(STATUS " Build shared libraries: ${XERCESC_BUILD_SHARED_LIBS}")
message(STATUS " Path delimiters: \"${path_delims}\"")
message(STATUS " File Manager: ${filemgr}")
message(STATUS " Mutex Manager: ${mutexmgr}")
diff --git a/cmake/XercesDLL.cmake b/cmake/XercesDLL.cmake
index 8ebb8aa09..a69078e64 100644
--- a/cmake/XercesDLL.cmake
+++ b/cmake/XercesDLL.cmake
@@ -20,7 +20,7 @@
# Option for selection of shared or static libraries, exported as
# cache variable
-set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries")
+# set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries")
# Add a d postfix to Debug libraries on Windows
@@ -35,7 +35,7 @@ set(XERCES_PLATFORM_IMPORT)
set(XERCES_TEMPLATE_EXTERN extern)
set(XERCES_DLL_EXPORT)
set(XERCES_STATIC_LIBRARY)
-if(NOT BUILD_SHARED_LIBS)
+if(NOT XERCESC_BUILD_SHARED_LIBS)
set(XERCES_STATIC_LIBRARY 1)
else()
if(WIN32)
diff --git a/cmake/XercesTranscoderSelection.cmake b/cmake/XercesTranscoderSelection.cmake
index 5dd7c6257..6c63df72f 100644
--- a/cmake/XercesTranscoderSelection.cmake
+++ b/cmake/XercesTranscoderSelection.cmake
@@ -23,8 +23,11 @@
# ICU
-if(ICU_FOUND)
- list(APPEND transcoders icu)
+# if(ICU_FOUND)
+# list(APPEND transcoders icu)
+# endif()
+if(UNIX AND NOT APPLE)
+ set(transcoder iconv)
endif()
# MacOS
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a168db125..9197034da 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1075,12 +1075,12 @@ endif()
list(APPEND libxerces_c_SOURCES ${xerces_replacement_funcs})
# NetAccessors, conditionally built based on selection
-if(SOCKET_LIBRARY)
- list(APPEND libxerces_c_DEPS ${SOCKET_LIBRARY})
-endif()
-if(NSL_LIBRARY)
- list(APPEND libxerces_c_DEPS ${NSL_LIBRARY})
-endif()
+# if(SOCKET_LIBRARY)
+# list(APPEND libxerces_c_DEPS ${SOCKET_LIBRARY})
+# endif()
+# if(NSL_LIBRARY)
+# list(APPEND libxerces_c_DEPS ${NSL_LIBRARY})
+# endif()
if(XERCES_USE_NETACCESSOR_CURL)
list(APPEND libxerces_c_SOURCES ${curl_sources})
@@ -1289,7 +1289,7 @@ elseif(UNIX)
# set the version in the filename, and create the symlink at install
# time. Note: could be dropped when the SONAME is updated and
# libtool compatibility is no longer required.
- if(BUILD_SHARED_LIBS)
+ if(XERCESC_BUILD_SHARED_LIBS)
set_target_properties(xerces-c PROPERTIES OUTPUT_NAME "xerces-c-${INTERFACE_VERSION_D}")
file(GENERATE
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake"
diff --git a/cmake/XercesNetAccessorSelection.cmake b/cmake/XercesNetAccessorSelection.cmake
index 7a63f1f6b..ecbcd1014 100644
--- a/cmake/XercesNetAccessorSelection.cmake
+++ b/cmake/XercesNetAccessorSelection.cmake
@@ -19,9 +19,9 @@
# netaccessor selection
-option(network "Network support" ON)
+option(XERCESC_NETWORK "Network support" OFF)
-if(network)
+if(XERCESC_NETWORK)
find_library(SOCKET_LIBRARY socket)
find_library(NSL_LIBRARY nsl)
@@ -93,4 +93,4 @@ if(network)
endif()
else()
set(netaccessor OFF)
-endif(network)
+endif(XERCESC_NETWORK)
diff --git a/cmake/XercesWarnings.cmake b/cmake/XercesWarnings.cmake
index f91be0faf..7ce567c9d 100644
--- a/cmake/XercesWarnings.cmake
+++ b/cmake/XercesWarnings.cmake
@@ -18,6 +18,7 @@
# limitations under the License.
# compiler warnings
+option(warnings "Enable compiler warnings" OFF)
# These are annoyingly verbose, produce false positives or don't work
# nicely with all supported compiler versions, so are disabled unless
@@ -33,25 +34,28 @@ option(fatal-warnings "Compiler warnings are errors" OFF)
# some of which are quite serious.
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR
CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- set(test_flags
- -Wall
- -Wcast-align
- -Wcast-qual
- -Wctor-dtor-privacy
- -Wextra
- -Wformat=2
- -Wimplicit-atomic-properties
- -Wmissing-declarations
- -Wno-long-long
- -Woverlength-strings
- -Woverloaded-virtual
- -Wredundant-decls
- -Wreorder
- -Wswitch-default
- -Wunused-variable
- -Wwrite-strings
- -Wno-variadic-macros
- -fstrict-aliasing)
+ set(test_flags)
+ if(warnings)
+ list(APPEND test_flags
+ -Wall
+ -Wcast-align
+ -Wcast-qual
+ -Wctor-dtor-privacy
+ -Wextra
+ -Wformat=2
+ -Wimplicit-atomic-properties
+ -Wmissing-declarations
+ -Wno-long-long
+ -Woverlength-strings
+ -Woverloaded-virtual
+ -Wredundant-decls
+ -Wreorder
+ -Wswitch-default
+ -Wunused-variable
+ -Wwrite-strings
+ -Wno-variadic-macros
+ -fstrict-aliasing)
+ endif()
if(extra-warnings)
list(APPEND test_flags
-Wfloat-equal