File tree Expand file tree Collapse file tree 5 files changed +39
-52
lines changed Expand file tree Collapse file tree 5 files changed +39
-52
lines changed Original file line number Diff line number Diff line change 8888 shell : cmd
8989 run : |
9090 call "C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
91- bash -c "ci/scripts/build_iceberg_windows .sh $(pwd)
91+ bash -c "ci/scripts/build_iceberg .sh $(pwd)
9292 - name : Build Example
9393 shell : cmd
9494 run : |
Original file line number Diff line number Diff line change @@ -25,10 +25,21 @@ build_dir=${1}/build
2525mkdir ${build_dir}
2626pushd ${build_dir}
2727
28- cmake \
29- -DCMAKE_PREFIX_PATH=${CMAKE_INSTALL_PREFIX:- ${ICEBERG_HOME} } \
30- ${source_dir}
31- cmake --build .
28+ CMAKE_ARGS=(
29+ " -DCMAKE_PREFIX_PATH=${CMAKE_INSTALL_PREFIX:- ${ICEBERG_HOME} } "
30+ " -DCMAKE_BUILD_TYPE=Debug"
31+ )
32+
33+ BUILD_ARGS=()
34+
35+ # Add Windows-specific toolchain file if on Windows
36+ if [[ " ${OSTYPE} " == " msys" || " ${OSTYPE} " == " win32" ]]; then
37+ CMAKE_ARGS+=(" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" )
38+ BUILD_ARGS+=(" --config Debug" )
39+ fi
40+
41+ cmake " ${CMAKE_ARGS[@]} " ${source_dir}
42+ cmake --build . " ${BUILD_ARGS[@]+" ${BUILD_ARGS[@]} " } "
3243
3344popd
3445
Original file line number Diff line number Diff line change @@ -25,12 +25,23 @@ build_dir=${1}/build
2525mkdir ${build_dir}
2626pushd ${build_dir}
2727
28- cmake \
29- -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX:- ${ICEBERG_HOME} } \
30- -DICEBERG_BUILD_STATIC=ON \
31- -DICEBERG_BUILD_SHARED=ON \
32- ${source_dir}
33- cmake --build . --target install
28+ CMAKE_ARGS=(
29+ " -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX:- ${ICEBERG_HOME} } "
30+ " -DICEBERG_BUILD_STATIC=ON"
31+ " -DICEBERG_BUILD_SHARED=ON"
32+ " -DCMAKE_BUILD_TYPE=Debug"
33+ )
34+
35+ BUILD_ARGS=()
36+
37+ # Add Windows-specific toolchain file if on Windows
38+ if [[ " ${OSTYPE} " == " msys" || " ${OSTYPE} " == " win32" ]]; then
39+ CMAKE_ARGS+=(" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" )
40+ BUILD_ARGS+=(" --config Debug" )
41+ fi
42+
43+ cmake " ${CMAKE_ARGS[@]} " ${source_dir}
44+ cmake --build . " ${BUILD_ARGS[@]+" ${BUILD_ARGS[@]} " } " --target install
3445ctest --output-on-failure -C Debug
3546
3647popd
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -171,14 +171,19 @@ function(resolve_avro_dependency)
171171
172172 set (AVRO_VENDORED TRUE )
173173 set_target_properties (avrocpp_s PROPERTIES OUTPUT_NAME "iceberg_vendored_avrocpp" )
174+ set_target_properties (avrocpp_s PROPERTIES POSITION_INDEPENDENT_CODE ON )
174175 install (TARGETS avrocpp_s
175176 EXPORT iceberg_targets
176177 RUNTIME DESTINATION "${ICEBERG_INSTALL_BINDIR} "
177178 ARCHIVE DESTINATION "${ICEBERG_INSTALL_LIBDIR} "
178179 LIBRARY DESTINATION "${ICEBERG_INSTALL_LIBDIR} " )
179180
180181 # TODO: add vendored ZLIB and Snappy support
181- list (APPEND ICEBERG_SYSTEM_DEPENDENCIES ZLIB Snappy)
182+ find_package (Snappy CONFIG)
183+ if (Snappy_FOUND)
184+ list (APPEND ICEBERG_SYSTEM_DEPENDENCIES Snappy)
185+ endif ()
186+ list (APPEND ICEBERG_SYSTEM_DEPENDENCIES ZLIB)
182187 else ()
183188 set (AVRO_VENDORED FALSE )
184189 list (APPEND ICEBERG_SYSTEM_DEPENDENCIES Avro)
You can’t perform that action at this time.
0 commit comments