./bootstrap
---------------------------------------------
CMake 3.12.4, Copyright 2000-2018 Kitware, Inc. and Contributors
Found GNU toolchain
C compiler on this system is: gcc
C++ compiler on this system is: g++
Makefile processor on this system is: gmake
g++ has setenv
g++ has unsetenv
g++ does not have environ in stdlib.h
g++ has stl wstring
g++ has <ext/stdio_filebuf.h>
---------------------------------------------
gmake: “cmake”是最新的。
loading initial cache file /home/CompileSrcGit/cmake-3.12.4/Bootstrap.cmk/InitialCacheFlags.cmake
CMake Error at CMakeLists.txt:92 (message):
The C++ compiler does not support C++11 (e.g. std::unique_ptr).
-- Configuring incomplete, errors occurred!
See also "/home/CompileSrcGit/cmake-3.12.4/CMakeFiles/CMakeOutput.log".
See also "/home/CompileSrcGit/cmake-3.12.4/CMakeFiles/CMakeError.log".
---------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
---------------------------------------------
解决过程:
先查询了gcc版本,这里因为我事先编译安装了gcc源码。
[root@localhost cmake-3.12.4]# gcc --version
gcc (GCC) 8.2.0
Copyright © 2018 Free Software Foundation, Inc.
本程序是自由软件;请参看源代码的版权声明。本软件没有任何担保;
包括没有适销性和某一专用目的下的适用性担保。
以上表明gcc没有问题,其实gcc4.8以上即可。
执行以下来解决。
[root@localhost cmake-3.12.4]# export CXXFLAGS="-std=c++11"
[root@localhost cmake-3.12.4]# ./bootstrap