thelfer / MFrontGenericInterfaceSupport

This project aims at providing support for MFront generic behaviours. This project can be embedded in open-source and propriary sofware
37 stars 35 forks source link

Macro _GLIBCXX_DEBUG as CMake option #4

Closed ojamond closed 5 years ago

ojamond commented 5 years ago

When building with gnu compilers in debug mode, mgis is compiled with the macro _GLIBCXX_DEBUG defined. This option for gcc cause problems for applications linking with mgis which are not build with this macro defined (crash when loading the behavior). It seems that when this macro is defined in a library, it should be defined "everywhere" (see for instance: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53324).

It would be great if this option could be enabled/disabled by a cmake option.

The same applies for tfel.

thelfer commented 5 years ago

Hi Olivier,

a new option enable-glibcxx-debug has been added. It is disabled by default.

To enable it:

cmake -DCMAKE_BUILD_TYPE=Debug -Denable-glibcxx-debug=ON ...

This has been merged in tfel, MFrontGallery, MGIS and MFrontMaterials. You shall also update Mefisto.

Best,

Thomas