File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3638,12 +3638,6 @@ function(build_orc)
36383638
36393639 set (CMAKE_UNITY_BUILD FALSE )
36403640
3641- # ORC's CMakeLists.txt unconditionally adds /std:c++17 on MSVC via
3642- # add_compile_options, which overrides CMAKE_CXX_STANDARD and causes
3643- # ABI mismatches with protobuf. Prevent this by pre-setting the check
3644- # result so the flag is not added.
3645- set (CPP17_FLAG_SUPPORTED OFF )
3646-
36473641 set (ORC_PREFER_STATIC_LZ4 OFF )
36483642 set (LZ4_HOME "${ORC_LZ4_ROOT} " )
36493643 set (LZ4_INCLUDE_DIR "${ORC_LZ4_INCLUDE_DIR} " )
@@ -3693,6 +3687,15 @@ function(build_orc)
36933687
36943688 fetchcontent_makeavailable (orc)
36953689
3690+ # ORC 2.2.1 unconditionally adds /std:c++17 on MSVC via
3691+ # add_compile_options, which overrides CMAKE_CXX_STANDARD and causes
3692+ # ABI mismatches with protobuf (GlobalEmptyStringConstexpr vs
3693+ # GlobalEmptyStringDynamicInit). Override the standard on the orc target.
3694+ # Fixed in ORC 2.3.0: https://github.com/apache/orc/commit/7674f43
3695+ if (MSVC )
3696+ target_compile_options (orc PRIVATE "/std:c++${CMAKE_CXX_STANDARD } " )
3697+ endif ()
3698+
36963699 add_library (orc::orc INTERFACE IMPORTED )
36973700 target_link_libraries (orc::orc INTERFACE orc )
36983701 target_link_libraries (orc::orc INTERFACE ${ARROW_PROTOBUF_LIBPROTOBUF} )
You can’t perform that action at this time.
0 commit comments