Repository: apache/arrow
File: ci/scripts/cpp_build.sh (Shell)

Code before:
    -DARROW_USE_TSAN=${ARROW_USE_TSAN:-OFF} \
    -DARROW_USE_UBSAN=${ARROW_USE_UBSAN:-OFF} \
    -DARROW_VERBOSE_THIRDPARTY_BUILD=${ARROW_VERBOSE_THIRDPARTY_BUILD:-OFF} \
    -DARROW_WITH_BROTLI=${ARROW_WITH_BROTLI:-OFF} \
    -DARROW_WITH_BZ2=${ARROW_WITH_BZ2:-OFF} \
    -DARROW_WITH_LZ4=${ARROW_WITH_LZ4:-OFF} \
    -DARROW_WITH_OPENTELEMETRY=${ARROW_WITH_OPENTELEMETRY:-OFF} \
    -DARROW_WITH_MUSL=${ARROW_WITH_MUSL:-OFF} \
    -DARROW_WITH_SNAPPY=${ARROW_WITH_SNAPPY:-OFF} \
    -DARROW_WITH_UTF8PROC=${ARROW_WITH_UTF8PROC:-ON} \
    -DARROW_WITH_ZLIB=${ARROW_WITH_ZLIB:-OFF} \
    -DARROW_WITH_ZSTD=${ARROW_WITH_ZSTD:-OFF} \
    -DAWSSDK_SOURCE=${AWSSDK_SOURCE:-} \
    -DAzure_SOURCE=${Azure_SOURCE:-} \
    -Dbenchmark_SOURCE=${benchmark_SOURCE:-} \
    -DBOOST_SOURCE=${BOOST_SOURCE:-} \
    -DBrotli_SOURCE=${Brotli_SOURCE:-} \
    -DBUILD_WARNING_LEVEL=${BUILD_WARNING_LEVEL:-CHECKIN} \
    -Dc-ares_SOURCE=${cares_SOURCE:-} \
    -DCMAKE_BUILD_TYPE=${ARROW_BUILD_TYPE:-debug} \
    -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE:-OFF} \
    -DCMAKE_C_FLAGS="${CFLAGS:-}" \
    -DCMAKE_CXX_FLAGS="${CXXFLAGS:-} -I${ODBC_INCLUDE_DIR:-} -L${ODBC_LIB_DIR:-}" \
    -DCMAKE_CXX_STANDARD="${CMAKE_CXX_STANDARD:-20}" \
    -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR:-lib} \
    -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX:-${ARROW_HOME}} \
    -DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD:-OFF} \
    -DCUDAToolkit_ROOT=${CUDAToolkit_ROOT:-} \
    -Dgflags_SOURCE=${gflags_SOURCE:-} \
    -Dgoogle_cloud_cpp_storage_SOURCE=${google_cloud_cpp_storage_SOURCE:-} \
    -DgRPC_SOURCE=${gRPC_SOURCE:-} \
    -DGTest_SOURCE=${GTest_SOURCE:-} \
    -Dlz4_SOURCE=${lz4_SOURCE:-} \
    -DODBC_INCLUDE_DIR="${ODBC_INCLUDE_DIR:-}" \
    -Dopentelemetry-cpp_SOURCE=${opentelemetry_cpp_SOURCE:-} \
    -DORC_SOURCE=${ORC_SOURCE:-} \
    -DPARQUET_BUILD_EXAMPLES=${PARQUET_BUILD_EXAMPLES:-OFF} \
    -DPARQUET_BUILD_EXECUTABLES=${PARQUET_BUILD_EXECUTABLES:-OFF} \
    -DPARQUET_REQUIRE_ENCRYPTION=${PARQUET_REQUIRE_ENCRYPTION:-ON} \
    -DProtobuf_SOURCE=${Protobuf_SOURCE:-} \
    -DRapidJSON_SOURCE=${RapidJSON_SOURCE:-} \
    -Dre2_SOURCE=${re2_SOURCE:-} \
    -DSnappy_SOURCE=${Snappy_SOURCE:-} \
    -DThrift_SOURCE=${Thrift_SOURCE:-} \
    -Dutf8proc_SOURCE=${utf8proc_SOURCE:-} \
    -Dzstd_SOURCE=${zstd_SOURCE:-} \
    -Dxsimd_SOURCE=${xsimd_SOURCE:-} \
    -G "${CMAKE_GENERATOR:-Ninja}" \
    ${ARROW_CMAKE_ARGS} \
    ${source_dir}
fi

Review comment (suggestion):
I am open to suggestions for other locations for `-I` and `-L` 🙂 

Code after:
    -DARROW_USE_MOLD=${ARROW_USE_MOLD:-OFF} \
    -DARROW_USE_STATIC_CRT=${ARROW_USE_STATIC_CRT:-OFF} \
    -DARROW_USE_TSAN=${ARROW_USE_TSAN:-OFF} \
    -DARROW_USE_UBSAN=${ARROW_USE_UBSAN:-OFF} \
    -DARROW_VERBOSE_THIRDPARTY_BUILD=${ARROW_VERBOSE_THIRDPARTY_BUILD:-OFF} \
    -DARROW_WITH_BROTLI=${ARROW_WITH_BROTLI:-OFF} \
    -DARROW_WITH_BZ2=${ARROW_WITH_BZ2:-OFF} \
    -DARROW_WITH_LZ4=${ARROW_WITH_LZ4:-OFF} \
    -DARROW_WITH_OPENTELEMETRY=${ARROW_WITH_OPENTELEMETRY:-OFF} \
    -DARROW_WITH_MUSL=${ARROW_WITH_MUSL:-OFF} \
    -DARROW_WITH_SNAPPY=${ARROW_WITH_SNAPPY:-OFF} \
    -DARROW_WITH_UTF8PROC=${ARROW_WITH_UTF8PROC:-ON} \
    -DARROW_WITH_ZLIB=${ARROW_WITH_ZLIB:-OFF} \
    -DARROW_WITH_ZSTD=${ARROW_WITH_ZSTD:-OFF} \
    -DAWSSDK_SOURCE=${AWSSDK_SOURCE:-} \
    -DAzure_SOURCE=${Azure_SOURCE:-} \
    -Dbenchmark_SOURCE=${benchmark_SOURCE:-} \
    -DBOOST_SOURCE=${BOOST_SOURCE:-} \
    -DBrotli_SOURCE=${Brotli_SOURCE:-} \
    -DBUILD_WARNING_LEVEL=${BUILD_WARNING_LEVEL:-CHECKIN} \
    -Dc-ares_SOURCE=${cares_SOURCE:-} \
    -DCMAKE_BUILD_TYPE=${ARROW_BUILD_TYPE:-debug} \
    -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE:-OFF} \
    -DCMAKE_C_FLAGS="${CFLAGS:-}" \
    -DCMAKE_CXX_FLAGS="${CXXFLAGS:-}" \
    -DCMAKE_CXX_STANDARD="${CMAKE_CXX_STANDARD:-20}" \
    -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR:-lib} \
    -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX:-${ARROW_HOME}} \
    -DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD:-OFF} \
    -DCUDAToolkit_ROOT=${CUDAToolkit_ROOT:-} \
    -Dgflags_SOURCE=${gflags_SOURCE:-} \
    -Dgoogle_cloud_cpp_storage_SOURCE=${google_cloud_cpp_storage_SOURCE:-} \
    -DgRPC_SOURCE=${gRPC_SOURCE:-} \
    -DGTest_SOURCE=${GTest_SOURCE:-} \
    -Dlz4_SOURCE=${lz4_SOURCE:-} \
    -Dopentelemetry-cpp_SOURCE=${opentelemetry_cpp_SOURCE:-} \
    -DORC_SOURCE=${ORC_SOURCE:-} \
    -DPARQUET_BUILD_EXAMPLES=${PARQUET_BUILD_EXAMPLES:-OFF} \
    -DPARQUET_BUILD_EXECUTABLES=${PARQUET_BUILD_EXECUTABLES:-OFF} \
    -DPARQUET_REQUIRE_ENCRYPTION=${PARQUET_REQUIRE_ENCRYPTION:-ON} \
    -DProtobuf_SOURCE=${Protobuf_SOURCE:-} \
    -DRapidJSON_SOURCE=${RapidJSON_SOURCE:-} \
    -Dre2_SOURCE=${re2_SOURCE:-} \
    -DSnappy_SOURCE=${Snappy_SOURCE:-} \
    -DThrift_SOURCE=${Thrift_SOURCE:-} \
    -Dutf8proc_SOURCE=${utf8proc_SOURCE:-} \
    -Dzstd_SOURCE=${zstd_SOURCE:-} \
    -Dxsimd_SOURCE=${xsimd_SOURCE:-} \
    -G "${CMAKE_GENERATOR:-Ninja}" \
    ${ARROW_CMAKE_ARGS} \
    ${source_dir}