Skip to content

Commit a67ab5a

Browse files
authored
build(c/driver/postgresql): include portable-snippets (apache#3643)
Avoid exposing other vendored libraries on accident. Closes apache#3642.
1 parent 6d458a2 commit a67ab5a

File tree

6 files changed

+16
-8
lines changed

6 files changed

+16
-8
lines changed

c/driver/postgresql/CMakeLists.txt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ add_arrow_lib(adbc_driver_postgresql
5656
foreach(LIB_TARGET ${ADBC_LIBRARIES})
5757
target_compile_definitions(${LIB_TARGET} PRIVATE ADBC_EXPORTING)
5858
target_include_directories(${LIB_TARGET} SYSTEM
59-
PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/
60-
${LIBPQ_INCLUDE_DIRS} ${REPOSITORY_ROOT}/c/driver)
59+
PRIVATE ${REPOSITORY_ROOT}/c/
60+
${REPOSITORY_ROOT}/c/include/
61+
${LIBPQ_INCLUDE_DIRS}
62+
${REPOSITORY_ROOT}/c/driver
63+
${REPOSITORY_ROOT}/c/vendor/portable-snippets/include
64+
)
6165

6266
if(NOT ADBC_DEFINE_COMMON_ENTRYPOINTS)
6367
target_compile_definitions(${LIB_TARGET} PRIVATE ${ADBC_TARGET_COMPILE_DEFINITIONS})
@@ -103,8 +107,12 @@ if(ADBC_BUILD_TESTS)
103107
${TEST_LINK_LIBS})
104108
target_compile_features(adbc-driver-postgresql-copy-test PRIVATE cxx_std_17)
105109
target_include_directories(adbc-driver-postgresql-copy-test SYSTEM
106-
PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/
107-
${LIBPQ_INCLUDE_DIRS} ${REPOSITORY_ROOT}/c/driver)
110+
PRIVATE ${REPOSITORY_ROOT}/c/
111+
${REPOSITORY_ROOT}/c/include/
112+
${LIBPQ_INCLUDE_DIRS}
113+
${REPOSITORY_ROOT}/c/driver
114+
${REPOSITORY_ROOT}/c/vendor/portable-snippets/include
115+
)
108116
adbc_configure_target(adbc-driver-postgresql-copy-test)
109117
endif()
110118

c/vendor/portable-snippets/safe-math.h renamed to c/vendor/portable-snippets/include/portable-snippets/safe-math.h

File renamed without changes.

dev/release/rat_exclude_files.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ c/vendor/backward/*
1111
c/vendor/fmt/*
1212
c/vendor/sqlite3/sqlite3.c
1313
c/vendor/sqlite3/sqlite3.h
14-
c/vendor/portable-snippets/safe-math.h
14+
c/vendor/portable-snippets/include/portable-snippets/safe-math.h
1515
ci/conda/.ci_support/*
1616
ci/conda/.gitattributes
1717
ci/linux-packages/changelog

r/adbcpostgresql/src/Makevars.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
CXX_STD = CXX17
19-
PKG_CPPFLAGS=-I../src/c -I../src/c/include -I../src/c/vendor/ -I../src/c/vendor/fmt/include @cppflags@ -DADBC_EXPORT="" -DFMT_HEADER_ONLY=1
19+
PKG_CPPFLAGS=-I../src/c -I../src/c/include -I../src/c/vendor/ -I../src/c/vendor/portable-snippets/include/ -I../src/c/vendor/fmt/include @cppflags@ -DADBC_EXPORT="" -DFMT_HEADER_ONLY=1
2020
PKG_LIBS=@libs@
2121

2222
OBJECTS = init.o \

r/adbcpostgresql/src/Makevars.ucrt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
CXX_STD = CXX17
19-
PKG_CPPFLAGS = -I../src/c -I../src/c/include -I../src/c/vendor/ -I../src/c/vendor/fmt/include -DADBC_EXPORT="" -D__USE_MINGW_ANSI_STDIO -DFMT_HEADER_ONLY=1
19+
PKG_CPPFLAGS = -I../src/c -I../src/c/include -I../src/c/vendor/ -I../src/c/vendor/portable-snippets/include/ -I../src/c/vendor/fmt/include -DADBC_EXPORT="" -D__USE_MINGW_ANSI_STDIO -DFMT_HEADER_ONLY=1
2020

2121
PKG_LIBS = -lpq -lpgcommon -lpgport -lssl -lcrypto -lz -lsecur32 -lws2_32 -lwldap32 -lcrypt32
2222

r/adbcpostgresql/src/Makevars.win

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
VERSION = 13.2.0
1919
RWINLIB = ../windows/libpq-$(VERSION)
2020
CXX_STD = CXX17
21-
PKG_CPPFLAGS = -I$(RWINLIB)/include -I../src/c -I../src/c/include -I../src/c/vendor/ -I../src/c/vendor/fmt/include -DADBC_EXPORT="" -D__USE_MINGW_ANSI_STDIO -DFMT_HEADER_ONLY=1
21+
PKG_CPPFLAGS = -I$(RWINLIB)/include -I../src/c -I../src/c/include -I../src/c/vendor/ -I../src/c/vendor/portable-snippets/include/ -I../src/c/vendor/fmt/include -DADBC_EXPORT="" -D__USE_MINGW_ANSI_STDIO -DFMT_HEADER_ONLY=1
2222
PKG_LIBS = -L$(RWINLIB)/lib${R_ARCH}${CRT} \
2323
-lpq -lpgport -lpgcommon -lssl -lcrypto -lwsock32 -lsecur32 -lws2_32 -lgdi32 -lcrypt32 -lwldap32
2424

0 commit comments

Comments
 (0)