Skip to content

Commit 99fbd29

Browse files
committed
WIP: [C++] Bump to CMake 3.25+ to use FetchContent
1 parent fbea8e0 commit 99fbd29

File tree

11 files changed

+384
-278
lines changed

11 files changed

+384
-278
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
cmake_minimum_required (VERSION 3.12.0)
18+
cmake_minimum_required (VERSION 3.25.0)
1919
if (POLICY CMP0048)
2020
cmake_policy(SET CMP0048 NEW)
2121
endif ()

c++/src/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ CHECK_CXX_SOURCE_RUNS("
119119
HAS_POST_2038
120120
)
121121

122-
set(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR})
123-
set(CMAKE_REQUIRED_LIBRARIES orc_zlib)
122+
set(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
123+
set(CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARIES})
124124
CHECK_CXX_SOURCE_COMPILES("
125125
#define Z_PREFIX
126126
#include<zlib.h>
@@ -205,14 +205,14 @@ add_library (orc STATIC ${SOURCE_FILES})
205205
target_link_libraries (orc
206206
INTERFACE
207207
${ORC_INSTALL_INTERFACE_TARGETS}
208-
PRIVATE
208+
PUBLIC
209209
$<BUILD_INTERFACE:orc::protobuf>
210210
$<BUILD_INTERFACE:orc::zlib>
211-
$<BUILD_INTERFACE:orc::snappy>
211+
$<BUILD_INTERFACE:orc::Snappy>
212212
$<BUILD_INTERFACE:orc::lz4>
213213
$<BUILD_INTERFACE:orc::zstd>
214214
$<BUILD_INTERFACE:${LIBHDFSPP_LIBRARIES}>
215-
$<BUILD_INTERFACE:${SPARSEHASH_LIBRARIES}>
215+
$<BUILD_INTERFACE:$<TARGET_NAME_IF_EXISTS:orc::sparsehash>>
216216
)
217217

218218
target_include_directories (orc

c++/test/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ add_executable (orc-test
6262

6363
target_link_libraries (orc-test
6464
orc
65-
orc::lz4
66-
orc::protobuf
67-
orc::snappy
68-
orc::zlib
6965
orc::gtest
7066
orc::gmock
7167
)
@@ -76,7 +72,6 @@ add_executable (create-test-files
7672

7773
target_link_libraries (create-test-files
7874
orc
79-
orc::protobuf
8075
)
8176

8277
if (TEST_VALGRIND_MEMCHECK)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)