Qihoo360/logkafka

Explicitly set CXXFLAGS for the C++11 standard in CMakeLists.txt

slimhazard opened this issue · 1 comments

My first attempt to build after git clone failed with this message:

[ 10%] Building CXX object src/CMakeFiles/logkafka.dir/logkafka/signal_handler.cc.o
In file included from /usr/include/c++/4.9/thread:35:0,
                 from /home/geoff/Software/logkafka/src/third_party/easylogging/easylogging++.h:280,
                 from /home/geoff/Software/logkafka/src/logkafka/signal_handler.h:33,
                 from /home/geoff/Software/logkafka/src/logkafka/signal_handler.cc:22:
/usr/include/c++/4.9/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.

That step succeeded after adding this line to CMakeLists.txt:

set(CMAKE_CXX_FLAGS "-std=c++11")

Fixed