Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builds in debug mode when CMAKE_BUILD_TYPE=Release #389

Closed
yurivict opened this issue Nov 25, 2017 · 2 comments
Closed

Builds in debug mode when CMAKE_BUILD_TYPE=Release #389

yurivict opened this issue Nov 25, 2017 · 2 comments
Assignees

Comments

@yurivict
Copy link
Contributor

With CMAKE_BUILD_TYPE=Release getting these warning:

#warning "NDEBUG is not defined in GF. This leads to very slow code. Define ALPS_GF_DEBUG to suppress this warning"
 ^

CMAKE_BUILD_TYPE should fully determine debug flags.

@galexv galexv self-assigned this Nov 25, 2017
@galexv galexv added the ongoing label Dec 3, 2017
@galexv
Copy link
Collaborator

galexv commented Jan 4, 2018

@yurivict I cannot reproduce this behavior on my Linux box with CMake 3.1 and gcc 5.4. Default CMake flags for CMAKE_BUILD_TYPE=Release already include '-DNDEBUG', and ALPSCore's cmake script just adds -DBOOST_DISABLE_ASSERTS. I do not observe any warnings regarding potentially slow code.

That's said, FreeBSD and Ubuntu Linux default CMake settings might differ. Although it's easy to patch this particular problem (simply by adding "-DNDEBUG" explicitly to compiler flags in our cmake scripts), i'd like to get to the root of it. Unfortunately, we currently do not have access to a FreeBSD box. Could you please generate a fresh CMakeCache.txt (by running cmake -DCMAKE_BUILD_TYPE=Release /path/to/ALPSCore_source) and attach it here? Thanks!

galexv added a commit that referenced this issue Jan 11, 2018
...but a client code still should get the warning.

Also, modified compilation flags are now recorded in CMake cache.

This is tangentially related to issue #389 and should close #419.
ryanlevy pushed a commit to ryanlevy/ALPSCore that referenced this issue Jan 15, 2018
...but a client code still should get the warning.

Also, modified compilation flags are now recorded in CMake cache.

This is tangentially related to issue ALPSCore#389 and should close ALPSCore#419.
@egull
Copy link
Collaborator

egull commented Feb 8, 2018

This is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants