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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]