libsigc++>=2.5.1 requires "-std=c++11" compiler flag with cmake #144

Open
opened 2015-12-29 08:32:26 +00:00 by PyroDevil · 0 comments
PyroDevil commented 2015-12-29 08:32:26 +00:00 (Migrated from github.com)

When compiling mkxp on Archlinux with libsigc++=2.6.2 build with cmake fails because the "-std=c++11" flag is missing.

In file included from /usr/include/c++/5.3.0/type_traits:35:0,
                 from /usr/include/sigc++-2.0/sigc++/visit_each.h:22,
                 from /usr/include/sigc++-2.0/sigc++/functors/slot.h:6,
                 from /usr/include/sigc++-2.0/sigc++/signal_base.h:27,
                 from /usr/include/sigc++-2.0/sigc++/signal.h:8,
                 from /tmp/mkxp/src/sharedstate.h:25,
                 from /tmp/mkxp/src/main.cpp:34:
/usr/include/c++/5.3.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -
std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^

Workaround is by adding the flag to the cmake commandline:

$ cmake -DMRIVERSION=2.2 -DCMAKE_CXX_FLAGS=-std=c++11 ..

From the website of libsigc++ it requires c++11 since version >=2.5.1.

When compiling mkxp on Archlinux with libsigc++=2.6.2 build with cmake fails because the "-std=c++11" flag is missing. ``` In file included from /usr/include/c++/5.3.0/type_traits:35:0, from /usr/include/sigc++-2.0/sigc++/visit_each.h:22, from /usr/include/sigc++-2.0/sigc++/functors/slot.h:6, from /usr/include/sigc++-2.0/sigc++/signal_base.h:27, from /usr/include/sigc++-2.0/sigc++/signal.h:8, from /tmp/mkxp/src/sharedstate.h:25, from /tmp/mkxp/src/main.cpp:34: /usr/include/c++/5.3.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or - std=gnu++11 compiler options. #error This file requires compiler and library support for the \ ^ ``` Workaround is by adding the flag to the cmake commandline: ``` $ cmake -DMRIVERSION=2.2 -DCMAKE_CXX_FLAGS=-std=c++11 .. ``` From the [website](http://libsigc.sourceforge.net/index.shtml#features) of libsigc++ it requires c++11 since version >=2.5.1.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: MapleShrine/mkxp#144
No description provided.