This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new ed7c34243 ORC-1751: [C++] fix syntax error in ThirdpartyToolchain
ed7c34243 is described below

commit ed7c3424303bad2dda1a0c10e936b2baa4fb8d2e
Author: luffy-zh <[email protected]>
AuthorDate: Wed Aug 7 10:05:02 2024 -0700

    ORC-1751: [C++] fix syntax error in ThirdpartyToolchain
    
    ### What changes were proposed in this pull request?
    fix syntax error in ThirdpartyToolchain
    
    ### Why are the changes needed?
    Handle the issue discussed [here]( 
https://github.com/apache/arrow/pull/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 <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 cmake_modules/ThirdpartyToolchain.cmake | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/cmake_modules/ThirdpartyToolchain.cmake 
b/cmake_modules/ThirdpartyToolchain.cmake
index aa520ff61..80c1064b7 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -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})
@@ -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})
@@ -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})
@@ -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})
@@ -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 ()
@@ -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})
@@ -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})

Reply via email to