You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "WillAyd (via GitHub)" <gi...@apache.org> on 2023/06/23 21:51:02 UTC

[GitHub] [arrow-adbc] WillAyd commented on a diff in pull request #844: build(c): force C++11 for drivers for R's sake

WillAyd commented on code in PR #844:
URL: https://github.com/apache/arrow-adbc/pull/844#discussion_r1240435868


##########
c/cmake_modules/AdbcDefines.cmake:
##########
@@ -60,16 +60,40 @@ if(CXX_LINKER_SUPPORTS_VERSION_SCRIPT)
 endif()
 
 # Set common build options
-macro(adbc_configure_target TARGET)
-  if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-    target_compile_options(${TARGET}
-                           PRIVATE -Wall
-                                   -Werror
-                                   -Wextra
-                                   -Wpedantic
-                                   -Wno-unused-parameter
-                                   -Wunused-result)
+if(NOT ADBC_BUILD_WARNING_LEVEL OR ADBC_BUILD_WARNING_LEVEL STREQUAL "")
+  if("${CMAKE_BUILD_TYPE}" STREQUAL "RELEASE")
+    set(ADBC_BUILD_WARNING_LEVEL "PRODUCTION")
+  else()
+    set(ADBC_BUILD_WARNING_LEVEL "CHECKIN")
+  endif()
+endif()
+
+set(ADBC_C_CXX_FLAGS)
+if("${ADBC_BUILD_WARNING_LEVEL}" STREQUAL "CHECKIN")
+  if(MSVC)
+    set(ADBC_C_CXX_FLAGS /Wall /WX)

Review Comment:
   Not a Windows expert by any means but wondering if we should start with a lower warning level like W2, W3, or W4 instead of Wall? 
   



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org