hesphoros commented on code in PR #3553:
URL: https://github.com/apache/brpc/pull/3553#discussion_r4052207088


##########
CMakeLists.txt:
##########
@@ -21,7 +21,12 @@ project(brpc C CXX)
 option(WITH_GLOG "With glog" OFF)
 option(WITH_MESALINK "With MesaLink" OFF)
 option(WITH_BORINGSSL "With BoringSSL" OFF)
-option(DEBUG "Print debug logs" OFF)
+set(BRPC_DEBUG_DEFAULT OFF)
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+    set(BRPC_DEBUG_DEFAULT ON)
+endif()
+option(DEBUG "Print debug logs" ${BRPC_DEBUG_DEFAULT})

Review Comment:
   Updated in 7f39b49d. The custom `DEBUG` option and manual `NDEBUG` 
definition are removed, so CMake now manages `NDEBUG` per configuration. I 
verified build-type changes in one Unix Makefiles directory, Ninja 
Multi-Config, Xcode Debug/Release build settings, and a full Debug 
`brpc-static` build on arm64.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to