path: root/package/cmake/0001-rename_cmake_rootfile.patch
diff options
authorGravatar Davide Viti <zinosat@tiscali.it>2015-03-08 10:47:20 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-03-15 18:38:53 +0100
commit7b17bafc5d7948aff3059e058ada80ad1fc50500 (patch)
treeb4a18558788ea46388c2b66f2e60378b96e8227a /package/cmake/0001-rename_cmake_rootfile.patch
parent466a3aa661efb1e90d9ab06a2c83a22b7f1c8b76 (diff)
package/cmake: make ctest a target package too
Useful for packages shipped with a testsuite which makes use of ctest Since ctest is just a tool provided by the cmake sources, this change introduces a hidden BR2_PACKAGE_CMAKE symbol which is automatically selected by the BR2_PACKAGE_CMAKE_CTEST one. This is like this mostly for consistency (cmake is the actual package, not ctest). CMake is a particular package: * CMake can be built using the generic infrastructure or the cmake one. Since Buildroot has no requirement regarding the host system cmake program presence, it uses the generic infrastructure to build the host-cmake package, then the (target-)cmake package can be built using the cmake infrastructure; * CMake bundles its dependencies within its sources. This is the reason why the host-cmake package only has host-pkgconf as (runtime) dependency, whereas the (target-)cmake package has a lot of dependencies, using only the system-wide libraries instead of rebuilding and staitcally linking with the ones bundles into the CMake sources. [Thomas: - add missing C++ dependency. - add missing multiple 'select' in Config.in - add missing wchar dependency, inherited from selecting libarchive.] Signed-off-by: Davide Viti <zinosat@tiscali.it> Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/cmake/0001-rename_cmake_rootfile.patch')
1 files changed, 23 insertions, 0 deletions
diff --git a/package/cmake/0001-rename_cmake_rootfile.patch b/package/cmake/0001-rename_cmake_rootfile.patch
new file mode 100644
index 0000000000..915b7e32bb
--- /dev/null
+++ b/package/cmake/0001-rename_cmake_rootfile.patch
@@ -0,0 +1,23 @@
+ctest fails on the target, because it cannot find CMake.cmake inside
+CMAKE_DATA_DIR (typically set to "/usr/share/cmake-3.0"): all *.cmake
+files are removed at build time via the target-finalize rule.
+This buildroot-specific patch makes sure ctest looks also for
+"Modules/CMake.cmake.ctest" before complaining
+Signed-off-by: Davide Viti <zinosat@tiscali.it>
+--- cmake-3.0.2/Source/cmake.cxx~ 2014-09-11 15:24:01.000000000 +0200
++++ cmake-3.0.2/Source/cmake.cxx 2014-11-25 15:48:04.461033690 +0100
+@@ -957,7 +957,10 @@
+ "Path to cpack program executable.", cmCacheManager::INTERNAL);
+ #endif
+ if(!cmSystemTools::FileExists(
+- (cmSystemTools::GetCMakeRoot()+"/Modules/CMake.cmake").c_str()))
++ (cmSystemTools::GetCMakeRoot()+"/Modules/CMake.cmake").c_str()) &&
++ !cmSystemTools::FileExists(
++ (cmSystemTools::GetCMakeRoot()+"/Modules/CMake.cmake.ctest").c_str())
++ )
+ {
+ // couldn't find modules
+ cmSystemTools::Error("Could not find CMAKE_ROOT !!!\n"