[ https://issues.apache.org/jira/browse/THRIFT-4167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15956147#comment-15956147 ]
Arnaud Lacombe commented on THRIFT-4167: ---------------------------------------- I should have checked for the feature provided in cmake 2.8, sorry about that. There don't seem to be any way to set C++11 options automatically (some compiler version only accepts -std=c++1x, others -std=c++11) and THRIFT-4165 proposal to bump to cmake 3.1 sounds good. Feel free to close this as duplicate, I'll go with -DCMAKE_CXX_STANDARD=11 in my application. > Missing compile flag > -------------------- > > Key: THRIFT-4167 > URL: https://issues.apache.org/jira/browse/THRIFT-4167 > Project: Thrift > Issue Type: Bug > Reporter: Arnaud Lacombe > Assignee: James E. King, III > Attachments: 0001-fix-build.patch > > > While trying to build the following on ubuntu 16.04: > # cmake -DBUILD_COMPILER=ON -DBUILD_LIBRARIES=ON -DBUILD_TESTING=OFF > -DBUILD_EXAMPLES=OFF -DWITH_CPP=ON -DWITH_BOOST_STATIC=ON > -DWITH_STDTHREADS=ON .. > the build dies on the following: > In file included from /usr/include/c++/5/thread:35:0, > from /tmp/thrift/lib/cpp/src/thrift/concurrency/Thread.h:32, > from > /tmp/thrift/lib/cpp/src/thrift/concurrency/ThreadManager.h:26, > from > /build_tmp/thrift/lib/cpp/src/thrift/concurrency/ThreadManager.cpp:22: > /usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file > requires compiler and library support for the ISO C++ 2011 standard. This > support must be enabled with the -std=c++11 or -std=gnu++11 compiler options. > #error This file requires compiler and library support > [...] -- This message was sent by Atlassian JIRA (v6.3.15#6346)