Don't use GLIBCXX_ASSERTIONS in production
Closes #627 (closed)
I assumed that this flag GLIBCXX_ASSERTIONS
has no effect when the build type is Release. However I did some timing measurements and observed an increase of ~6 percent when using. This is fine for development builds but not for production.
Merge request reports
Activity
added Bug label
- Resolved by snuverink_j
mentioned in merge request !471 (merged)
@gsell could you review this MR?
101 101 102 102 # Enables extra error checking in the form of precondition assertion, such 103 103 # as bounds checking and null pointer checks when dereferencing smart pointers 104 add_compile_options(-Wp,-D_GLIBCXX_ASSERTIONS) 104 string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) 105 if (uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELWITHDEBINFO)$") 106 add_compile_options(-Wp,-D_GLIBCXX_ASSERTIONS) 107 endif() @kraus sorry, did not saw this MR.
Actually I would prefer to have this option in for all build types as long as the code has not been released. Hence in the master it should be in for all build types.
added 1 commit
- 197cf862 - don't disable glibcxx_assertions when the build type is Release but if the...
1 1 cmake_minimum_required (VERSION 3.1) 2 2 project (OPAL VERSION 2.5.0) 3 3 set (PROJECT_BUGREPORT opal@lists.psi.ch) 4 set (BUILD_FOR_PRODUCTION OFF) changed this line in version 3 of the diff
@gsell could you have a look at this MR?
mentioned in commit b02ea9bf
changed milestone to %OPAL 2021.1