paleolimbot commented on code in PR #573:
URL: https://github.com/apache/arrow-nanoarrow/pull/573#discussion_r1705564440
##########
CMakeLists.txt:
##########
@@ -145,41 +147,17 @@ target_include_directories(nanoarrow
PUBLIC
$<BUILD_INTERFACE:${NANOARROW_BUILD_INCLUDE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/src>
$<INSTALL_INTERFACE:include>)
-target_compile_definitions(nanoarrow PUBLIC
"$<$<CONFIG:Debug>:NANOARROW_DEBUG>")
-
-# Ensure targets/headers can be installed
-install(TARGETS nanoarrow
- DESTINATION lib
- EXPORT nanoarrow-exports)
-
install(FILES ${NANOARROW_INSTALL_HEADERS} DESTINATION include/nanoarrow)
-if(CMAKE_BUILD_TYPE STREQUAL "Debug")
- if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
- target_compile_options(nanoarrow
- PRIVATE -Wall
- -Werror
- -Wextra
- -Wpedantic
- -Wno-type-limits
- -Wmaybe-uninitialized
- -Wunused-result
- -Wconversion
- -Wno-sign-conversion)
- elseif(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_C_COMPILER_ID
STREQUAL
- "Clang")
- target_compile_options(nanoarrow
- PRIVATE -Wall
- -Werror
- -Wextra
- -Wpedantic
- -Wdocumentation
- -Wconversion
- -Wno-sign-conversion)
+if(NANOARROW_IPC)
+ # flatcc requires C11 for alignas() and static_assert() in flatcc_generated.h
+ # It may be possible to use C99 mode to build the runtime and/or generated
header
Review Comment:
I am going to punt on C99 for now but I think flatcc provides some of these
workarounds if this is something we really need. Off the top of my head, I
think C11 might not be available on MSVC (although I checked my local Windows
environment and it seems to build without problem). From `flatcc --help`:
```
The generated source assumes C11 functionality for alignment, compile
time assertions and inline functions but an optional set of portability
headers can be included to work with most any compiler. The portability
layer is not throughly tested so a platform specific test is required
before production use. Upstream patches are welcome.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]