What an error like "CMAKE_BOOTSTRAP_BINARY_DIR" at a time when you create CMake from source code

What is an error like "CMAKE_BOOTSTRAP_BINARY_DIR". How can I build cmake from source.

Environment:

Reproduction:

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

Error (in. / 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

Note:

  • "/ home / usagi / repos" is the repository pool directory in my account. ("usagi" is my username on this system.)
+4
source share
2 answers

I got a solution when I tried in the afternoon.

Decision:

rm *
git checkout -f

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

make

"./bootstrap" is not required in this environment.

+2
source

All Articles