从源代码构建 CMake 时一次 "CMAKE_BOOTSTRAP_BINARY_DIR" 的错误是什么

What's the error as "CMAKE_BOOTSTRAP_BINARY_DIR" at a time as build CMake from a source code

错误是什么 "CMAKE_BOOTSTRAP_BINARY_DIR"。如何从源代码构建 cmake。

环境:

复制:

git clone git@github.com:Kitware/CMake.git
cd CMake
git checkout v3.2.2
./bootstrap

错误(位于 ./bootstrap):

---------------------------------------------
g++  -I/home/usagi/repos/CMake/Bootstrap.cmk -I/home/usagi/repos/CMake/Source   -I/home/usagi/repos/CMake/Bootstrap.cmk -c /home/usagi/repos/CMake/Source/cmSystemTools.cxx -o cmSystemTools.o
/home/usagi/repos/CMake/Source/cmSystemTools.cxx: In static member function ‘static void cmSystemTools::FindCMakeResources(const char*)’:
/home/usagi/repos/CMake/Source/cmSystemTools.cxx:2195:13: error: ‘CMAKE_BOOTSTRAP_BINARY_DIR’ was not declared in this scope
   exe_dir = CMAKE_BOOTSTRAP_BINARY_DIR "/bin";
             ^
/home/usagi/repos/CMake/Source/cmSystemTools.cxx:2249:28: error: ‘CMAKE_BOOTSTRAP_SOURCE_DIR’ was not declared in this scope
   cmSystemToolsCMakeRoot = CMAKE_BOOTSTRAP_SOURCE_DIR;
                            ^
Makefile:88: recipe for target 'cmSystemTools.o' failed
make: *** [cmSystemTools.o] Error 1
---------------------------------------------
Error when bootstrapping CMake:
Problem while running make

注:

我在午饭后尝试得到解决方案。

解决方法:

rm *
git checkout -f

./configure # In the environment, it is not require "./bootstrap".

make

"./bootstrap" 在此环境中不需要。

我在 mac 遇到了同样的问题并且花了很多时间, 这是最好的下载 cmake dmg 来自:

https://cmake.org/download/ (并且只在路径中添加了 cmake)

而且运行良好。

我发现了一些关于 cmake 中的错误的额外信息

https://cmake.org/pipermail/cmake-commits/2014-June/019853.html

最好的, 一.