Skip to content

Commit

Permalink
turn on only if Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
copyme committed Oct 16, 2018
1 parent 716d6d6 commit de3cdb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/DGtal/base/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace DGtal
{

#ifndef NDEBUG
#ifdef __GNUG__
#ifdef __linux__
void beforeMain (void) __attribute__((constructor));
void beforeMain (void)
{
Expand Down
2 changes: 2 additions & 0 deletions src/DGtal/base/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@
#include <boost/static_assert.hpp>

#ifndef NDEBUG
#ifdef __linux__
#include <fenv.h>
#endif
#endif


#ifdef _MSC_VER
Expand Down

2 comments on commit de3cdb7

@dcoeurjo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why removing the GNUG ?
One can compile on Linux with clang. Not sure if the new flags work with this compiler.

@copyme
Copy link
Member Author

@copyme copyme commented on de3cdb7 Nov 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dcoeurjo It will not work on OS X. They do work with clang and this thing works with clang too but apparently it will only work with Linux.

Please sign in to comment.