-
Notifications
You must be signed in to change notification settings - Fork 132
fix(c): Generate versioned DLLs and import LIBs when building with MSVC #2858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
a01b836
4a2394a
3ae75c3
b8ad1f2
c2254ee
cc41040
f87b1d4
563cfd4
cf87023
fa7e0f6
9f73ec3
2a5a1eb
08f96db
d0ebe48
112599a
4cefd77
12f66b7
aab31a1
81e9ea5
10c3776
81b6db7
622a066
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include <windows.h> | ||
IIFE marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
VS_VERSION_INFO VERSIONINFO | ||
FILEVERSION @ADBC_VERSION_MAJOR@,@ADBC_VERSION_MINOR@,@ADBC_VERSION_PATCH@,0 | ||
PRODUCTVERSION @ADBC_VERSION_MAJOR@,@ADBC_VERSION_MINOR@,@ADBC_VERSION_PATCH@,0 | ||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK | ||
FILEFLAGS 0x0L | ||
FILEOS VOS__WINDOWS32 | ||
FILETYPE VFT_DLL | ||
FILESUBTYPE VFT2_UNKNOWN | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to specify this with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the main file type value that makes sense for the produced files (DLLs). The rest are unrelated to the DLL file type |
||
BEGIN | ||
BLOCK "StringFileInfo" | ||
BEGIN | ||
BLOCK "040904b0" | ||
IIFE marked this conversation as resolved.
Show resolved
Hide resolved
|
||
BEGIN | ||
VALUE "FileDescription", "ADBC: Arrow Database Connectivity" | ||
VALUE "FileVersion", "@ADBC_FULL_SO_VERSION@" | ||
VALUE "ProductVersion", "@ADBC_FULL_SO_VERSION@" | ||
VALUE "CompanyName", "Apache" | ||
IIFE marked this conversation as resolved.
Show resolved
Hide resolved
|
||
VALUE "ProductName", "@LIB_NAME@" | ||
END | ||
END | ||
BLOCK "VarFileInfo" | ||
BEGIN | ||
VALUE "Translation", 0x409, 1200 | ||
IIFE marked this conversation as resolved.
Show resolved
Hide resolved
|
||
END | ||
END |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,18 @@ if(ADBC_BUILD_TESTS) | |
adbc_driver_common | ||
adbc_validation | ||
${TEST_LINK_LIBS}) | ||
|
||
if(ADBC_TEST_LINKAGE STREQUAL "shared") | ||
# The go build is not copying the DLL to the test location, causing the test to fail on Windows. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, how is this handled for the C/C++ builds? I wouldn't think CMake copies the DLL over... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems by default cmake copies the dll when it is referenced as a library by another cmake project (the test one in this case). However, because the flightsql and snowflake ones are generated manually via GoUtils, they are not getting copied to the test bin folder. |
||
if (MSVC) | ||
IIFE marked this conversation as resolved.
Show resolved
Hide resolved
|
||
add_custom_command(TARGET adbc-driver-flightsql-test POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_if_different | ||
"$<TARGET_FILE:adbc_driver_flightsql_shared>" | ||
"$<TARGET_FILE_DIR:adbc-driver-flightsql-test>" | ||
) | ||
endif() | ||
endif() | ||
|
||
target_compile_features(adbc-driver-flightsql-test PRIVATE cxx_std_17) | ||
target_include_directories(adbc-driver-flightsql-test SYSTEM | ||
PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/ | ||
|
Uh oh!
There was an error while loading. Please reload this page.