diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index cd9c5ad10fcaf3f0cdc03687d4ed2e0a00c42bbe..575b973734f68f6186251791a7acb242c8095b5f 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2163,6 +2163,11 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
   cmSystemToolsCMakeCommand = exe_dir;
   cmSystemToolsCMakeCommand += "/cmake";
   cmSystemToolsCMakeCommand += cmSystemTools::GetExecutableExtension();
+#ifndef CMAKE_BUILD_WITH_CMAKE
+  // The bootstrap cmake does not provide the other tools,
+  // so use the directory where they are about to be built.
+  exe_dir = CMAKE_BOOTSTRAP_BINARY_DIR "/bin";
+#endif
   cmSystemToolsCTestCommand = exe_dir;
   cmSystemToolsCTestCommand += "/ctest";
   cmSystemToolsCTestCommand += cmSystemTools::GetExecutableExtension();
diff --git a/bootstrap b/bootstrap
index 6a25a3f480df5d8166d3ae9d33d62c4e47110cf0..da84040ccd243e09282c72aef87db09e0c84debc 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1475,8 +1475,10 @@ fi
 # directory to a windows path.
 if ${cmake_system_mingw}; then
     CMAKE_BOOTSTRAP_SOURCE_DIR=`cd "${cmake_source_dir}"; pwd -W`
+    CMAKE_BOOTSTRAP_BINARY_DIR=`cd "${cmake_binary_dir}"; pwd -W`
 else
     CMAKE_BOOTSTRAP_SOURCE_DIR="${cmake_source_dir}"
+    CMAKE_BOOTSTRAP_BINARY_DIR="${cmake_binary_dir}"
 fi
 
 # Write CMake version
@@ -1485,6 +1487,7 @@ cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_MINOR ${cmake_versi
 cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_PATCH ${cmake_version_patch}"
 cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION \"${cmake_version}\""
 cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP_SOURCE_DIR \"${CMAKE_BOOTSTRAP_SOURCE_DIR}\""
+cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP_BINARY_DIR \"${CMAKE_BOOTSTRAP_BINARY_DIR}\""
 cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"/bootstrap-not-insalled\""
 cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP"