astitcher commented on a change in pull request #297:
URL: https://github.com/apache/qpid-proton/pull/297#discussion_r578567541



##########
File path: .travis.yml
##########
@@ -117,7 +117,7 @@ jobs:
     env:
     - PATH="/usr/local/opt/python/libexec/bin:/usr/local/bin:$PATH"
     - PKG_CONFIG_PATH='/usr/local/opt/[email protected]/lib/pkgconfig'
-    - QPID_PROTON_CMAKE_ARGS='-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 
-DTHREADERCISER=ON'
+    - QPID_PROTON_CMAKE_ARGS='-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 
-DPN_ENABLE_ASSERTIONS=ON -DTHREADERCISER=ON'

Review comment:
       See below

##########
File path: CMakeLists.txt
##########
@@ -132,6 +132,38 @@ if (CMAKE_BUILD_TYPE MATCHES "Coverage")
     COMMAND ${CMAKE_SOURCE_DIR}/scripts/record-coverage.sh ${CMAKE_SOURCE_DIR} 
${CMAKE_BINARY_DIR})
 endif()
 
+# Enable asserts for C/C++ code if requested
+#  from the LLVM project, 
https://opensource.apple.com/source/llvmCore/llvmCore-2358.3/CMakeLists.txt.auto.html
+if(CMAKE_BUILD_TYPE STREQUAL "Debug" )
+    option(PN_ENABLE_ASSERTIONS "Enable assertions" ON)
+else()
+    option(PN_ENABLE_ASSERTIONS "Enable assertions" OFF)
+endif()
+if(PN_ENABLE_ASSERTIONS)

Review comment:
       Please call this ``ENABLE_ASSERTIONS`` - we don't use a PN_ prefix as 
everything in the build is Proton! 

##########
File path: CMakeLists.txt
##########
@@ -132,6 +132,38 @@ if (CMAKE_BUILD_TYPE MATCHES "Coverage")
     COMMAND ${CMAKE_SOURCE_DIR}/scripts/record-coverage.sh ${CMAKE_SOURCE_DIR} 
${CMAKE_BINARY_DIR})
 endif()
 
+# Enable asserts for C/C++ code if requested
+#  from the LLVM project, 
https://opensource.apple.com/source/llvmCore/llvmCore-2358.3/CMakeLists.txt.auto.html

Review comment:
       That might be better - I'm not sure.

##########
File path: CMakeLists.txt
##########
@@ -132,6 +132,38 @@ if (CMAKE_BUILD_TYPE MATCHES "Coverage")
     COMMAND ${CMAKE_SOURCE_DIR}/scripts/record-coverage.sh ${CMAKE_SOURCE_DIR} 
${CMAKE_BINARY_DIR})
 endif()
 
+# Enable asserts for C/C++ code if requested
+#  from the LLVM project, 
https://opensource.apple.com/source/llvmCore/llvmCore-2358.3/CMakeLists.txt.auto.html
+if(CMAKE_BUILD_TYPE STREQUAL "Debug" )
+    option(PN_ENABLE_ASSERTIONS "Enable assertions" ON)
+else()
+    option(PN_ENABLE_ASSERTIONS "Enable assertions" OFF)
+endif()
+if(PN_ENABLE_ASSERTIONS)
+  # MSVC doesn't like _DEBUG on release builds.
+  if(NOT MSVC)
+    add_definitions(-D_DEBUG)
+  endif()

Review comment:
       This is not necessary at all - all we need to do is not define 
``NDEBUG`` no need to define ``_DEBUG`` which does nothing for our code or any 
compiler library except MSVC.




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

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