Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 197cf862 authored by kraus's avatar kraus
Browse files

don't disable glibcxx_assertions when the build type is Release but if the...

don't disable glibcxx_assertions when the build type is Release but if the variable BUILD_FOR_PRODUCTION is ON
parent ad01456b
No related branches found
No related tags found
1 merge request!468Don't use GLIBCXX_ASSERTIONS in production
This commit is part of merge request !468. Comments created here will be created in the context of that merge request.
cmake_minimum_required (VERSION 3.1)
project (OPAL VERSION 2.5.0)
set (PROJECT_BUGREPORT opal@lists.psi.ch)
set (BUILD_FOR_PRODUCTION OFF)
  • snuverink_j @snuverink_j ·
    Developer

    Instead of using set perhaps this can become an option instead? Then it can be interactively selected with ccmake or on the command line with -DBUILD_FOR_PRODUCTON=ON.

  • Owner

    I agree an option might be the better solution. Proposal:

    • option is off by default for dev. versions
    • option is on by default for released versions
  • Author Developer

    Ok, I can change it to an option but I would rather require that both the option is on and the compile type be release in order to disable this flag. [Edit:] I implemented it the way @gsell proposed. [/Edit]

    Edited by kraus
  • kraus @kraus

    changed this line in version 3 of the diff

    ·

    changed this line in version 3 of the diff

    Toggle commit list
  • Please register or sign in to reply
string (REGEX REPLACE "\\.([0-9])\\." ".0\\1." PACKAGE_VERSION ${PROJECT_VERSION})
string (REGEX REPLACE "\\.([0-9])$" ".0\\1" PACKAGE_VERSION ${PACKAGE_VERSION})
......@@ -101,8 +102,7 @@ elseif (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
# Enables extra error checking in the form of precondition assertion, such
# as bounds checking and null pointer checks when dereferencing smart pointers
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
if (uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELWITHDEBINFO)$")
if (NOT BUILD_FOR_PRODUCTION)
add_compile_options(-Wp,-D_GLIBCXX_ASSERTIONS)
endif()
else ()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment