-
Notifications
You must be signed in to change notification settings - Fork 518
feat: windows support [WIP] #216
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 all commits
7abb9e2
c74f276
7fb10c4
72f7214
89f02f5
8dc698b
5521744
88de5da
8b3b3ef
e8dc871
673cf8e
431b541
66a8c56
28d8c68
3255327
228dfae
402f2a1
fb8511f
828e457
83a6423
c26de94
60da06e
3a267a0
c575663
539dc20
c92a51c
de9724b
3dab143
52170b9
47df026
1f87aa7
d9abe33
689bb04
9b7321f
d4d4a0b
9133a76
938e5a5
6fb2707
0e427a2
1948e39
7a5cfb6
ed57793
5c61212
c6e5012
a7e5190
e7bbbfe
e9e9c5d
5c89b6e
62683bf
cda7187
26085af
6795a6c
a715ccc
7d50164
05cb8e6
194c2d6
488b9a5
2af50d5
59d7622
4d68a28
2d6a50b
f01b37e
6441c43
afe4013
2ab5b3f
3253bed
15f41d5
f76effe
d340290
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 |
|---|---|---|
|
|
@@ -3,8 +3,36 @@ cmake_policy(SET CMP0077 NEW) | |
| project(zvec) | ||
| set(CC_CXX_STANDARD 17) | ||
|
|
||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=return-type") | ||
| set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror=return-type") | ||
| if(MSVC) | ||
| set(INTTYPES_FORMAT VC7) | ||
| add_compile_options(/FS) #handle .pdb | ||
| add_compile_options(/EHsc) # def c++ exception behavior | ||
| add_compile_options(/Zc:preprocessor) | ||
| add_compile_options(/we4716) # -Werror=return-type | ||
|
|
||
|
|
||
| ###### reduce output length to make vibe coding work better :), which should be removed or solved later | ||
| add_compile_options(/wd4267 /wd4244) | ||
| add_compile_options(/wd4146) # unary minus operator applied to unsigned type #usage: uint32_t seg_id_{-1U}; | ||
| add_compile_options(/wd4310) # warning C4310: cast truncates constant value | ||
|
Comment on lines
+16
to
+17
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. Broad narrowing-conversion warnings suppressed without fix
Consider replacing the blanket suppression with targeted |
||
| add_compile_options(/wd4530) # warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc | ||
| add_compile_options(/wd4251) #protobuf | ||
| add_compile_options(/wd4245 /wd4334 /wd4702 /wd4305 /wd4099) | ||
| add_compile_options(/wd4200) # flexible structure | ||
|
|
||
| # //warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) | ||
| # keeps |= (1 << k); | ||
| add_compile_options(/wd4334) | ||
| ###### | ||
|
|
||
| #TODO(windows): to be verified | ||
| add_definitions(-DARROW_STATIC -DPARQUET_STATIC -DARROW_ACERO_STATIC -DARROW_DS_STATIC -DARROW_COMPUTE_STATIC) | ||
|
Collaborator
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. 这个有点过于hack了吧。。不加难道会有问题吗?
Collaborator
Author
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. As the TODO comment suggests, this needs re-verification and refinement. I'll address it after the Windows CI is set up. |
||
|
|
||
|
|
||
| else() | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=return-type") | ||
| set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror=return-type") | ||
| endif() | ||
|
|
||
| if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
| set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-as-needed") | ||
|
|
@@ -27,6 +55,7 @@ endif() | |
|
|
||
| include_directories(${PROJECT_ROOT_DIR}/src/include) | ||
| include_directories(${PROJECT_ROOT_DIR}/src) | ||
| include_directories(${PROJECT_ROOT_DIR}) | ||
|
Collaborator
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. 为什么要加上这个?
Collaborator
Author
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. To include tests/test_util.h, which contains definitions for sleep and a wildcard-supporting remove function. I'll clean this up later by moving sleep to platform.h and removing wildcard usage from the UTs. |
||
|
|
||
| option(BUILD_PYTHON_BINDINGS "Build Python bindings using pybind11" OFF) | ||
| message(STATUS "BUILD_PYTHON_BINDINGS:${BUILD_PYTHON_BINDINGS}") | ||
|
|
@@ -99,4 +128,14 @@ if(BUILD_PYTHON_BINDINGS) | |
|
|
||
| message(STATUS "Zvec install path: ${ZVEC_PY_INSTALL_DIR}") | ||
| install(TARGETS _zvec LIBRARY DESTINATION ${ZVEC_PY_INSTALL_DIR}) | ||
|
|
||
| if(MSVC) | ||
| install(FILES | ||
| $<TARGET_FILE:glog> | ||
| $<TARGET_FILE:gflags> | ||
| $<TARGET_FILE:roaring> | ||
| $<TARGET_FILE:libprotobuf> | ||
| DESTINATION ${ZVEC_PY_INSTALL_DIR} | ||
| ) | ||
| endif() | ||
| endif() | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这部分warning的编号可以统一放在一个add_compile_options里头吧,并且加上每个编号的注释。