0001-rename-cmake-rootfile.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. Signed-off-by: Davide Viti <zinosat@tiscali.it>
  13. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  14. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
  15. ---
  16. Source/cmake.cxx | 7 ++++++-
  17. 1 file changed, 6 insertions(+), 1 deletion(-)
  18. diff --git a/Source/cmake.cxx b/Source/cmake.cxx
  19. index 3772f09985..c317e4af38 100644
  20. --- a/Source/cmake.cxx
  21. +++ b/Source/cmake.cxx
  22. @@ -1009,7 +1009,12 @@ int cmake::AddCMakePaths()
  23. "Path to cpack program executable.", cmStateEnums::INTERNAL);
  24. #endif
  25. if (!cmSystemTools::FileExists(
  26. - (cmSystemTools::GetCMakeRoot() + "/Modules/CMake.cmake"))) {
  27. + (cmSystemTools::GetCMakeRoot() + "/Modules/CMake.cmake")) &&
  28. + !cmSystemTools::FileExists(
  29. + (cmSystemTools::GetCMakeRoot()+"/Modules/CMake.cmake.ctest")
  30. + )
  31. + )
  32. + {
  33. // couldn't find modules
  34. cmSystemTools::Error(
  35. "Could not find CMAKE_ROOT !!!\n"
  36. --
  37. 2.20.1