1
1
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
2
- index 3d4a162..6926bc3 100644
2
+ index d4cd035..0701a7d 100644
3
3
--- a/c++/src/CMakeLists.txt
4
4
+++ b/c++/src/CMakeLists.txt
5
- @@ -230 ,12 +230 ,13 @@ endif(BUILD_LIBHDFSPP)
5
+ @@ -239 ,12 +239 ,13 @@ endif(BUILD_LIBHDFSPP)
6
6
add_library (orc STATIC ${SOURCE_FILES})
7
7
8
8
target_link_libraries (orc
9
- - protobuf
10
- - zlib
11
- - snappy
12
- - lz4
13
- - zstd
9
+ - orc:: protobuf
10
+ - orc:: zlib
11
+ - orc:: snappy
12
+ - orc:: lz4
13
+ - orc:: zstd
14
14
- ${LIBHDFSPP_LIBRARIES}
15
15
+ PRIVATE
16
16
+ protobuf::libprotobuf
@@ -23,10 +23,10 @@ index 3d4a162..6926bc3 100644
23
23
24
24
install(TARGETS orc DESTINATION lib)
25
25
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
26
- index 3a35325..56ffd74 100644
26
+ index 6919847..ad52cf2 100644
27
27
--- a/cmake_modules/ThirdpartyToolchain.cmake
28
28
+++ b/cmake_modules/ThirdpartyToolchain.cmake
29
- @@ -59 ,8 +59 ,8 @@ endif ()
29
+ @@ -66 ,8 +66 ,8 @@ endif ()
30
30
# ----------------------------------------------------------------------
31
31
# Snappy
32
32
@@ -37,18 +37,23 @@ index 3a35325..56ffd74 100644
37
37
set(SNAPPY_VENDORED FALSE)
38
38
else ()
39
39
set(SNAPPY_HOME "${THIRDPARTY_DIR}/snappy_ep-install")
40
- @@ -78,10 +78 ,6 @@ else ()
40
+ @@ -90,15 +90 ,6 @@ else ()
41
41
set(SNAPPY_VENDORED TRUE)
42
42
endif ()
43
43
44
- - include_directories (SYSTEM ${SNAPPY_INCLUDE_DIR})
45
- - add_library (snappy STATIC IMPORTED)
46
- - set_target_properties (snappy PROPERTIES IMPORTED_LOCATION ${SNAPPY_STATIC_LIB})
44
+ - add_library (orc_snappy INTERFACE)
45
+ - add_library (orc::snappy ALIAS orc_snappy)
46
+ - if (ORC_PREFER_STATIC_SNAPPY AND ${SNAPPY_STATIC_LIB})
47
+ - target_link_libraries(orc_snappy INTERFACE ${SNAPPY_STATIC_LIB})
48
+ - else ()
49
+ - target_link_libraries(orc_snappy INTERFACE ${SNAPPY_LIBRARY})
50
+ - endif ()
51
+ - target_include_directories (orc_snappy SYSTEM INTERFACE ${SNAPPY_INCLUDE_DIR})
47
52
-
48
53
if (SNAPPY_VENDORED)
49
- add_dependencies (snappy snappy_ep)
54
+ add_dependencies (orc_snappy snappy_ep)
50
55
if (INSTALL_VENDORED_LIBS)
51
- @@ -93 ,7 +89 ,7 @@ endif ()
56
+ @@ -110 ,7 +101 ,7 @@ endif ()
52
57
# ----------------------------------------------------------------------
53
58
# ZLIB
54
59
@@ -57,62 +62,86 @@ index 3a35325..56ffd74 100644
57
62
find_package (ZLIB REQUIRED)
58
63
set(ZLIB_VENDORED FALSE)
59
64
else ()
60
- @@ -120,10 +116 ,6 @@ else ()
65
+ @@ -142,15 +133 ,6 @@ else ()
61
66
set(ZLIB_VENDORED TRUE)
62
67
endif ()
63
68
64
- - include_directories (SYSTEM ${ZLIB_INCLUDE_DIR})
65
- - add_library (zlib STATIC IMPORTED)
66
- - set_target_properties (zlib PROPERTIES IMPORTED_LOCATION ${ZLIB_STATIC_LIB})
69
+ - add_library (orc_zlib INTERFACE)
70
+ - add_library (orc::zlib ALIAS orc_zlib)
71
+ - if (ORC_PREFER_STATIC_ZLIB AND ${ZLIB_STATIC_LIB})
72
+ - target_link_libraries (orc_zlib INTERFACE ${ZLIB_STATIC_LIB})
73
+ - else ()
74
+ - target_link_libraries (orc_zlib INTERFACE ${ZLIB_LIBRARY})
75
+ - endif ()
76
+ - target_include_directories (orc_zlib SYSTEM INTERFACE ${ZLIB_INCLUDE_DIR})
67
77
-
68
78
if (ZLIB_VENDORED)
69
- add_dependencies (zlib zlib_ep)
79
+ add_dependencies (orc_zlib zlib_ep)
70
80
if (INSTALL_VENDORED_LIBS)
71
- @@ -135 ,8 +127 ,8 @@ endif ()
81
+ @@ -162 ,8 +144 ,8 @@ endif ()
72
82
# ----------------------------------------------------------------------
73
83
# Zstd
74
84
75
85
- if (NOT "${ZSTD_HOME}" STREQUAL "")
76
86
- find_package (ZSTD REQUIRED)
77
87
+ if (1)
78
- + find_package (zstd CONFIG REQUIRED)
88
+ + find_package (ZSTD CONFIG REQUIRED)
79
89
set(ZSTD_VENDORED FALSE)
80
90
else ()
81
91
set(ZSTD_HOME "${THIRDPARTY_DIR}/zstd_ep-install")
82
- @@ -169,10 +161 ,6 @@ else ()
92
+ @@ -201,15 +183 ,6 @@ else ()
83
93
set(ZSTD_VENDORED TRUE)
84
94
endif ()
85
95
86
- - include_directories (SYSTEM ${ZSTD_INCLUDE_DIR})
87
- - add_library (zstd STATIC IMPORTED)
88
- - set_target_properties (zstd PROPERTIES IMPORTED_LOCATION ${ZSTD_STATIC_LIB})
96
+ - add_library (orc_zstd INTERFACE)
97
+ - add_library (orc::zstd ALIAS orc_zstd)
98
+ - if (ORC_PREFER_STATIC_ZSTD AND ${ZSTD_STATIC_LIB})
99
+ - target_link_libraries (orc_zstd INTERFACE ${ZSTD_STATIC_LIB})
100
+ - else ()
101
+ - target_link_libraries (orc_zstd INTERFACE ${ZSTD_LIBRARY})
102
+ - endif ()
103
+ - target_include_directories (orc_zstd SYSTEM INTERFACE ${ZSTD_INCLUDE_DIR})
89
104
-
90
105
if (ZSTD_VENDORED)
91
- add_dependencies (zstd zstd_ep)
106
+ add_dependencies (orc_zstd zstd_ep)
92
107
if (INSTALL_VENDORED_LIBS)
93
- @@ -184 ,8 +172 ,8 @@ endif ()
108
+ @@ -221 ,8 +194 ,8 @@ endif ()
94
109
# ----------------------------------------------------------------------
95
110
# LZ4
96
111
97
112
- if (NOT "${LZ4_HOME}" STREQUAL "")
98
113
- find_package (LZ4 REQUIRED)
99
114
+ if (1)
100
- + find_package (lz4 CONFIG REQUIRED)
115
+ + find_package (LZ4 CONFIG REQUIRED)
101
116
set(LZ4_VENDORED FALSE)
102
117
else ()
103
118
set(LZ4_PREFIX "${THIRDPARTY_DIR}/lz4_ep-install")
104
- @@ -211,10 +199 ,6 @@ else ()
119
+ @@ -253,15 +226 ,6 @@ else ()
105
120
set(LZ4_VENDORED TRUE)
106
121
endif ()
107
122
108
- - include_directories (SYSTEM ${LZ4_INCLUDE_DIR})
109
- - add_library (lz4 STATIC IMPORTED)
110
- - set_target_properties (lz4 PROPERTIES IMPORTED_LOCATION ${LZ4_STATIC_LIB})
123
+ - add_library (orc_lz4 INTERFACE)
124
+ - add_library (orc::lz4 ALIAS orc_lz4)
125
+ - if (ORC_PREFER_STATIC_LZ4 AND ${LZ4_STATIC_LIB})
126
+ - target_link_libraries (orc_lz4 INTERFACE ${LZ4_STATIC_LIB})
127
+ - else ()
128
+ - target_link_libraries (orc_lz4 INTERFACE ${LZ4_LIBRARY})
129
+ - endif ()
130
+ - target_include_directories (orc_lz4 SYSTEM INTERFACE ${LZ4_INCLUDE_DIR})
111
131
-
112
132
if (LZ4_VENDORED)
113
- add_dependencies (lz4 lz4_ep)
133
+ add_dependencies (orc_lz4 lz4_ep)
114
134
if (INSTALL_VENDORED_LIBS)
115
- @@ -288,8 +272,8 @@ endif ()
135
+ @@ -273,7 +237,7 @@ endif ()
136
+ # ----------------------------------------------------------------------
137
+ # IANA - Time Zone Database
138
+
139
+ - if (WIN32)
140
+ + if (WIN32 AND TEST_VALGRIND_MEMCHECK)
141
+ SET(CURRENT_TZDATA_FILE "")
142
+ SET(CURRENT_TZDATA_SHA512 "")
143
+ File(DOWNLOAD "https://ftp.osuosl.org/pub/cygwin/noarch/release/tzdata/sha512.sum" ${CMAKE_CURRENT_BINARY_DIR}/sha512.sum)
144
+ @@ -372,8 +336,8 @@ endif ()
116
145
# ----------------------------------------------------------------------
117
146
# Protobuf
118
147
@@ -123,40 +152,41 @@ index 3a35325..56ffd74 100644
123
152
set(PROTOBUF_VENDORED FALSE)
124
153
else ()
125
154
set(PROTOBUF_PREFIX "${THIRDPARTY_DIR}/protobuf_ep-install")
126
- @@ -327,12 +311,6 @@ endif ()
127
-
128
- include_directories (SYSTEM ${PROTOBUF_INCLUDE_DIR})
129
-
130
- - add_library (protobuf STATIC IMPORTED)
131
- - set_target_properties (protobuf PROPERTIES IMPORTED_LOCATION ${PROTOBUF_STATIC_LIB})
132
- -
133
- - add_library (protoc STATIC IMPORTED)
134
- - set_target_properties (protoc PROPERTIES IMPORTED_LOCATION ${PROTOC_STATIC_LIB})
155
+ @@ -421,19 +385,7 @@ add_library (orc::protobuf ALIAS orc_protobuf)
156
+ add_library (orc_protoc INTERFACE)
157
+ add_library (orc::protoc ALIAS orc_protoc)
158
+
159
+ - if (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOBUF_STATIC_LIB})
160
+ - target_link_libraries (orc_protobuf INTERFACE ${PROTOBUF_STATIC_LIB})
161
+ - else ()
162
+ - target_link_libraries (orc_protobuf INTERFACE ${PROTOBUF_LIBRARY})
163
+ - endif()
164
+ - target_include_directories (orc_protobuf SYSTEM INTERFACE ${PROTOBUF_INCLUDE_DIR})
135
165
-
166
+ - if (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOC_STATIC_LIB})
167
+ - target_link_libraries (orc_protoc INTERFACE ${PROTOC_STATIC_LIB})
168
+ - else ()
169
+ - target_link_libraries (orc_protoc INTERFACE ${PROTOC_LIBRARY})
170
+ - endif()
171
+ - target_include_directories (orc_protoc SYSTEM INTERFACE ${PROTOBUF_INCLUDE_DIR})
172
+ + include_directories (SYSTEM ${PROTOBUF_INCLUDE_DIR})
173
+
136
174
if (PROTOBUF_VENDORED)
137
- add_dependencies (protoc protobuf_ep)
138
- add_dependencies (protobuf protobuf_ep)
175
+ add_dependencies (orc_protoc protobuf_ep)
139
176
diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt
140
- index f5a53ca..ec22e7a 100644
177
+ index d55581b..701fd7c 100644
141
178
--- a/tools/src/CMakeLists.txt
142
179
+++ b/tools/src/CMakeLists.txt
143
- @@ -51,7 +51,6 @@ add_executable (orc-metadata
144
-
145
- target_link_libraries (orc-metadata
146
- orc
147
- - protobuf
148
- ${CMAKE_THREAD_LIBS_INIT}
149
- )
150
-
151
- @@ -92,7 +91,7 @@ target_link_libraries (csv-import
180
+ @@ -95,11 +95,7 @@ target_link_libraries (csv-import
152
181
)
153
182
154
183
install(TARGETS
155
184
- orc-contents
156
185
- orc-metadata
157
186
- orc-statistics
187
+ orc-scan
188
+ orc-memory
189
+ - timezone-dump
190
+ csv-import
158
191
- DESTINATION bin)
159
- + orc-scan
160
- + orc-memory
161
- + csv-import
162
192
+ DESTINATION tools/orc)
0 commit comments