You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "lidavidm (via GitHub)" <gi...@apache.org> on 2023/05/09 12:47:09 UTC

[GitHub] [arrow-nanoarrow] lidavidm commented on a diff in pull request #189: Add more C++ and error handling helpers

lidavidm commented on code in PR #189:
URL: https://github.com/apache/arrow-nanoarrow/pull/189#discussion_r1188532573


##########
CMakeLists.txt:
##########
@@ -41,6 +41,12 @@ else()
     set(NANOARROW_NAMESPACE_DEFINE "// #define NANOARROW_NAMESPACE YourNamespaceHere")
 endif()
 
+if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+    set(NANOARROW_DEBUG_DEFINE "#define NANOARROW_DEBUG 1")
+else()
+    set(NANOARROW_DEBUG_DEFINE "// #define NANOARROW_DEBUG 1")
+endif()

Review Comment:
   FWIW, CMake has an explicit feature for this: [target_compile_definitions](https://cmake.org/cmake/help/latest/command/target_compile_definitions.html)



##########
CMakeLists.txt:
##########
@@ -41,6 +41,12 @@ else()
     set(NANOARROW_NAMESPACE_DEFINE "// #define NANOARROW_NAMESPACE YourNamespaceHere")
 endif()
 
+if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+    set(NANOARROW_DEBUG_DEFINE "#define NANOARROW_DEBUG 1")
+else()
+    set(NANOARROW_DEBUG_DEFINE "// #define NANOARROW_DEBUG 1")
+endif()

Review Comment:
   Ah, though I suppose this is different since it'll propagate to anyone who includes nanoarrow_config.h.



-- 
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