0001-rename-cmake-rootfile.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 68d3b1dfbbd2f54bf81986d1d733deaf66658b15 Mon Sep 17 00:00:00 2001
  2. From: Davide Viti <zinosat@tiscali.it>
  3. Date: Thu, 14 Jul 2016 10:14:59 +0100
  4. Subject: [PATCH] rename cmake rootfile
  5. ctest fails on the target, because it cannot find CMake.cmake inside
  6. CMAKE_DATA_DIR (typically set to "/usr/share/cmake-3.0"): all *.cmake
  7. files are removed at build time via the target-finalize rule.
  8. This buildroot-specific patch makes sure ctest looks also for
  9. "Modules/CMake.cmake.ctest" before complaining
  10. [Vincent: tweak patch for 3.6.3]
  11. [James: tweak patch for 3.15.4]
  12. [Bernd: tweak patch for 3.27.0]
  13. Signed-off-by: Davide Viti <zinosat@tiscali.it>
  14. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  15. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
  16. Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
  17. ---
  18. Source/cmake.cxx | 7 ++++++-
  19. 1 file changed, 6 insertions(+), 1 deletion(-)
  20. diff --git a/Source/cmake.cxx b/Source/cmake.cxx
  21. index 3772f09985..c317e4af38 100644
  22. --- a/Source/cmake.cxx
  23. +++ b/Source/cmake.cxx
  24. @@ -1891,7 +1891,12 @@ int cmake::AddCMakePaths()
  25. cmStateEnums::INTERNAL);
  26. #endif
  27. if (!cmSystemTools::FileExists(
  28. - (cmSystemTools::GetCMakeRoot() + "/Modules/CMake.cmake"))) {
  29. + (cmSystemTools::GetCMakeRoot() + "/Modules/CMake.cmake")) &&
  30. + !cmSystemTools::FileExists(
  31. + (cmSystemTools::GetCMakeRoot()+"/Modules/CMake.cmake.ctest")
  32. + )
  33. + )
  34. + {
  35. // couldn't find modules
  36. cmSystemTools::Error(
  37. "Could not find CMAKE_ROOT !!!\n"
  38. --
  39. 2.20.1