You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cmake/debian/patches/fix-bootstrap-test-2.diff

60 lines
2.5 KiB

From 6650b0fa43ef55e8bad9188c584f40d515f38bd6 Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Wed, 25 Jun 2014 13:34:15 -0400
Subject: [PATCH] bootstrap: Fix "make test" and "make package" targets
(#14989)
Since commit v3.0.0-rc1~374^2 (Refactor internal resource location APIs
and initialization, 2013-11-07) a bootstrap-built "cmake" tries to
reference "ctest" and "cpack" executables next to itself, which never
exist. Teach cmSystemTools::FindCMakeResources, when bootstrap-built,
to refer to the "ctest" and "cpack" executables in the location where
they will be built after "make".
---
Source/cmSystemTools.cxx | 5 +++++
bootstrap | 3 +++
2 files changed, 8 insertions(+)
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index cd9c5ad..575b973 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 6a25a3f..da84040 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"
--
1.7.10.4