Skip to content

Commit

Permalink
ORC-1751: [C++] fix syntax error in ThirdpartyToolchain
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
fix syntax error in ThirdpartyToolchain

### Why are the changes needed?
Handle the issue discussed [here]( apache/arrow#43417)

### How was this patch tested?
Test it locally

### Was this patch authored or co-authored using generative AI tooling?
NO

Closes #1997 from luffy-zh/branch-2.0.

Authored-by: luffy-zh <zhnice@outlook.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
  • Loading branch information
luffy-zh authored and dongjoon-hyun committed Aug 7, 2024
1 parent d8a1ce6 commit ed7c342
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ add_library (orc_snappy INTERFACE)
add_library (orc::snappy ALIAS orc_snappy)
if (ORC_PACKAGE_KIND STREQUAL "conan")
target_link_libraries(orc_snappy INTERFACE ${Snappy_LIBRARIES})
elseif (ORC_PREFER_STATIC_SNAPPY AND ${SNAPPY_STATIC_LIB})
elseif (ORC_PREFER_STATIC_SNAPPY AND SNAPPY_STATIC_LIB)
target_link_libraries(orc_snappy INTERFACE ${SNAPPY_STATIC_LIB})
else ()
target_link_libraries(orc_snappy INTERFACE ${SNAPPY_LIBRARY})
Expand Down Expand Up @@ -169,7 +169,7 @@ add_library (orc_zlib INTERFACE)
add_library (orc::zlib ALIAS orc_zlib)
if (ORC_PACKAGE_KIND STREQUAL "conan")
target_link_libraries (orc_zlib INTERFACE ${ZLIB_LIBRARIES})
elseif (ORC_PREFER_STATIC_ZLIB AND ${ZLIB_STATIC_LIB})
elseif (ORC_PREFER_STATIC_ZLIB AND ZLIB_STATIC_LIB)
target_link_libraries (orc_zlib INTERFACE ${ZLIB_STATIC_LIB})
else ()
target_link_libraries (orc_zlib INTERFACE ${ZLIB_LIBRARY})
Expand Down Expand Up @@ -230,7 +230,7 @@ add_library (orc_zstd INTERFACE)
add_library (orc::zstd ALIAS orc_zstd)
if (ORC_PACKAGE_KIND STREQUAL "conan")
target_link_libraries (orc_zstd INTERFACE ${zstd_LIBRARIES})
elseif (ORC_PREFER_STATIC_ZSTD AND ${ZSTD_STATIC_LIB})
elseif (ORC_PREFER_STATIC_ZSTD AND ZSTD_STATIC_LIB)
target_link_libraries (orc_zstd INTERFACE ${ZSTD_STATIC_LIB})
else ()
target_link_libraries (orc_zstd INTERFACE ${ZSTD_LIBRARY})
Expand Down Expand Up @@ -288,7 +288,7 @@ add_library (orc_lz4 INTERFACE)
add_library (orc::lz4 ALIAS orc_lz4)
if (ORC_PACKAGE_KIND STREQUAL "conan")
target_link_libraries (orc_lz4 INTERFACE ${lz4_LIBRARIES})
elseif (ORC_PREFER_STATIC_LZ4 AND ${LZ4_STATIC_LIB})
elseif (ORC_PREFER_STATIC_LZ4 AND LZ4_STATIC_LIB)
target_link_libraries (orc_lz4 INTERFACE ${LZ4_STATIC_LIB})
else ()
target_link_libraries (orc_lz4 INTERFACE ${LZ4_LIBRARY})
Expand Down Expand Up @@ -389,7 +389,7 @@ if (BUILD_CPP_TESTS)
add_library (orc::gmock ALIAS orc_gmock)
add_library (orc_gtest INTERFACE)
add_library (orc::gtest ALIAS orc_gtest)
if (ORC_PREFER_STATIC_GMOCK AND ${GMOCK_STATIC_LIB})
if (ORC_PREFER_STATIC_GMOCK AND GMOCK_STATIC_LIB)
target_link_libraries (orc_gmock INTERFACE ${GMOCK_STATIC_LIB})
target_link_libraries (orc_gtest INTERFACE ${GTEST_STATIC_LIB})
else ()
Expand Down Expand Up @@ -464,7 +464,7 @@ add_library (orc::protoc ALIAS orc_protoc)

if (ORC_PACKAGE_KIND STREQUAL "conan")
target_link_libraries (orc_protobuf INTERFACE ${protobuf_LIBRARIES})
elseif (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOBUF_STATIC_LIB})
elseif (ORC_PREFER_STATIC_PROTOBUF AND PROTOBUF_STATIC_LIB)
target_link_libraries (orc_protobuf INTERFACE ${PROTOBUF_STATIC_LIB})
else ()
target_link_libraries (orc_protobuf INTERFACE ${PROTOBUF_LIBRARY})
Expand All @@ -476,7 +476,7 @@ else ()
endif ()

if (NOT ORC_PACKAGE_KIND STREQUAL "conan")
if (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOC_STATIC_LIB})
if (ORC_PREFER_STATIC_PROTOBUF AND PROTOC_STATIC_LIB)
target_link_libraries (orc_protoc INTERFACE ${PROTOC_STATIC_LIB})
else ()
target_link_libraries (orc_protoc INTERFACE ${PROTOC_LIBRARY})
Expand Down

0 comments on commit ed7c342

Please sign in to comment.