summaryrefslogtreecommitdiffstats
path: root/meta/classes/cmake.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* cmake: supply CMAKE_AR in toolchain fileCody P Schafer2014-12-051-0/+2
| | | | | | | (From OE-Core rev: 79144da00f005b5a3ab8f7404730216cfc684616) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: Try and improve cleaning of builds when B==SRichard Purdie2014-10-301-0/+2
| | | | | | | | | | Currently if B==S for a cmake recipe, the build will not reconfigure. This patch adds code to remove the generated cmake files, meaning cmake will then be forced to regenerate them. This forces cmake to see configuration changes it may not otherwise see. (From OE-Core rev: 01f4ed0cfbc60859aabfa5bff33ed966117a05d7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass : Add support for cmake projects that use .S files.Philip Balister2014-09-221-0/+3
| | | | | | | | | | | | UHD and GNU radio use the cmake build system. The toolchain file made from cmake.bbclass does not set the variable needs by cmake projects that use .S files. UHD added some .S files and these changes are required to build recent UHD. (From OE-Core rev: 43ce4b804d433662fe77c6f5298060ba74a0e639) Signed-off-by: Philip Balister <philip@balister.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: drop -fpermissiveMartin Jansa2014-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | * it was dropped from default CXXFLAGS in: commit 24dd8e129447013ee98609f3892ec414b1b21340 Author: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Sun Mar 2 17:38:33 2014 +0000 bitbake.conf: Drop -fpermissive Drop the -fpermissive C++ compiler flag. We've had this around for years, most code should have been fixed long ago. Its possible some recipes may fail however we can (and should) just use the flag where needed. * I haven't build world with this yet, but maybe it's time to drop it here as well at least for consistency (From OE-Core rev: 578124aedd3dbffd79ea01862d57223ffaa7216a) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: restore OECMAKE_SOURCEPATHRoss Burton2014-06-251-3/+6
| | | | | | | | | | | | | | | Some packages put their CMakeLists.txt file in a subdirectory, so assuming that it is in ${S} won't work. Restore OECMAKE_SOURCEPATH (defaulting to ${S}) so that the location of CMakeLists.txt can be set if required. Based on a patch by Miroslav Keš <miroslav.kes@gmail.com> (From OE-Core rev: 2c23d7ab913a636aa0ab6a6e899cf6211d1e2714) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: fix note when warning about deprecated variablesRoss Burton2014-01-221-1/+1
| | | | | | | | | | | The note issues when OECMAKE_BUILDPATH and OECMAKE_SOURCEPATH were being used stated that an in-tree build would be done, but the default is in fact an out-of-tree build. (From OE-Core rev: 0dafb9f78e9ab9ec1a1483efc37902c2e8de3623) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: specify all install pathsRoss Burton2014-01-141-0/+9
| | | | | | | | | | | Specify the full set of install paths (bindir, libdir, etc) for packages that use the GNUInstallDirs module, instead of just the prefix and leaving the rest as default (which breaks with multilib). (From OE-Core rev: d3995ac14ba05c0420f15f264f7e9d0c3af71f74) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: default to out-of-tree buildsRoss Burton2014-01-141-0/+1
| | | | | | | | | | | Set B=${WORKDIR}/build in cmake.bbclass so that recipes using cmake.bbclass do out-of-tree builds by default. (From OE-Core rev: 783fb88f476c94d5d4f4b954f7053464d9a6dff5) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: respect ${S} and ${B}Ross Burton2014-01-141-24/+11
| | | | | | | | | | | | | | | | | | | Instead of the class-specific variables OECMAKE_BUILDPATH and OECMAKE_SOURCEPATH, just use ${B} and ${S}. If these two paths are different, delete any existing ${B} before running a build so that previous builds don't taint the current build. Note that OECMAKE_SOURCEPATH and OECMAKE_BUILDPATH are not respected, so recipes that manually set these in the past will need to be updated to either use something along the lines of separatebuilddir.inc or set B themselves. If the old variables are set, a warning is displayed. (From OE-Core rev: 43073569cb67d98c11aa71211d77b566b64f9145) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: ensure CMAKE_SYSTEM_NAME is correctSaul Wold2013-09-101-1/+1
| | | | | | | | | | | | Using TARGET_OS can add the ABIEXTENSION so ensure that is is removed for the Linux TARGET_OS, we might have other TARGET_OSes so don't hard code CMAKE_SYSTEM_NAME [YOCTO #5145] (From OE-Core rev: 7d8b700242b1b32c6b6d0735b497701800f54fc4) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: set system name correctlyRichard Purdie2013-09-081-1/+1
| | | | | | | | | | | | For unknown reasons, the cmake class is using SDK_OS as the target system OS. This makes no sense but only shows up as a problem when you try a different SDK OS. Fix it to use TARGET_OS which is the correct thing to do. For the vast majority of users this will make no difference. (From OE-Core rev: 57be84259f0885865c85d7bac350979430b956b5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: Don't use packages from the native build machineStefan Herbrechtsmeier2013-08-161-0/+1
| | | | | | | | (From OE-Core rev: 044037d8add3556a90ac4da5991e1e5975d62e25) Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: modify construction of compiler flagsJoe Slater2013-05-291-2/+2
| | | | | | | | | | | | | | | | | Use CFLAGS instead of CPPFLAGS for C_FLAGS variants. When debug optimization is enabled in the local.conf, the debug (-O0) vs production (-O2) does not change in the builds. As the CPPFLAGS do not contain the optimization settings. Also the CXX_FLAGS are based on CXXFLAGS, so it makes sense to similarly set the C_FLAGS based on CFLAGS. (From OE-Core rev: 558662927be550aeb8dd163f65e16b1750bbd127) Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Jeff Polk <jeff.polk@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: reset B from autotools, as this class doesnt like itRoss Burton2013-02-041-0/+1
| | | | | | | (From OE-Core rev: f8eae815186976f6111f30ae88ac33e723863982) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: use DEPENDS_prepend instead of += for cmake-nativeRoss Burton2012-11-181-1/+1
| | | | | | | | | Otherwise when a recipe using DEPENDS=, the cmake-native dependency disappears. (From OE-Core rev: 2b35539d96325d8e687451543d4f52f1a07bf1c6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: Add OECMAKE_C_LINK_FLAGS and OECMAKE_CXX_LINK_FLAGS variablesKhem Raj2012-06-111-0/+4
| | | | | | | | | | | | | | In some cases we need to specify linker flags and right now we do not have a way to communicate that to cmake based systems. cmake defines CMAKE_C_LINK_FLAGS and CMAKE_CXX_LINK_FLAGS for these needs. This patch therefore defines two local variables namely OECMAKE_C_LINK_FLAGS and OECMAKE_CXX_LINK_FLAGS which can be altered by recipes to tweak linker flags (From OE-Core rev: 9e00a74749ba8e1cf0d15efe8e16af60b189e080) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: add ${base_libdir} to CMAKE_LIBRARY_PATHNitin A Kamble2012-03-131-1/+1
| | | | | | | | | | | | | | Some libraries like libcrypto.so are installed at base_libdir instead of libdir. So add the base_libdir to CMAKE_LIBRARY_PATH so that these libraries can be found correctly. This resolves an issues with libzypp, which was not finding the libcrypo library correctly in an x32 build. (From OE-Core rev: f47ada62a3da879006e7cb27479dc9b72c56e923) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Add EXTERNAL_TOOLCHAIN to CMAKE_FIND_ROOT_PATHKen Werner2012-02-031-1/+1
| | | | | | | | | This allows cmake to find the binaries of an external toolchain. (From OE-Core rev: 7b355ad09a622cfe57c66674ed1affd61c4d872e) Signed-off-by: Ken Werner <ken.werner@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: adding extendable extra variable to root pathAndrew Gabbasov2011-09-281-1/+2
| | | | | | | | | | | | Introducing a hook variable for various .conf files to add extra path elements to cmake. For example, it can be used in external toolchain conf file to add ${TOOLCHAIN_PATH} to cmake root path search. (From OE-Core rev: 23be60dad6a705f151520e3eda2da5e02230f5fd) Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass, perlnative.bbclass: arrange for cmake to find perl-nativePhil Blundell2011-08-171-1/+2
| | | | | | | | | | | | When CMake is looking for perl, it only searches in the specific directories that it's told about and ignores ${PATH}. If perlnative is in use, ensure that the appropriate installation path is added to the list of places that cmake will look for perl, otherwise it won't ever be found. (From OE-Core rev: add9e4e30e0b1e0f93479b43ce61953efb90985d) Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: add ${libdir} for multilib caseYu Ke2011-07-271-1/+1
| | | | | | | (From OE-Core rev: e198b72bc03c7545417944dcb3c930aaf2376488) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sat-solver: fix for non /usr/lib libdir caseYu Ke2011-07-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | when libdir set to non /usr/lib like /usr/lib64, there is do_configure error: " -- Libraries will be installed in /usr/lib CMake Error at /home/kyu3/sdb/lib64/tmp/sysroots/x86_64-linux/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE): Please install 'check' and 'check-devel' packages (missing: CHECK_LIBRARY) Call Stack (most recent call first): /home/kyu3/sdb/lib64/tmp/sysroots/x86_64-linux/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE) cmake/modules/FindCheck.cmake:17 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:35 (FIND_PACKAGE) -- Configuring incomplete, errors occurred! " The reason is that cmake did not search /usr/lib64 for libcheck, thus report error add ${libdir} to the CMAKE_SYSTEM_LIBRARY_PATH can fix this issue. (From OE-Core rev: f4de87ce30a37bb2f09855d442b34d153ada8c0e) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: use CPPFLAGS and CXXFLAGSOtavio Salvador2011-07-081-4/+4
| | | | | | | | | | | Some classes, as for example nativesdk, defines CPPFLAGS and CXXFLAGS to be passed to compiler. Using those makes more sense and avoid some hacks on packages using CMake. (From OE-Core rev: de60d1d91b28c3f5568b132a8eb29d9a754e68a0) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: fix qmake and rpath issuesOtavio Salvador2011-05-111-2/+12
| | | | | | | | | | | Sync with OE at 3b7d83362027fde4f6850533ab83277d95dda961 however without changing the way of generating the toolchain file and making it branding agnostic. (From OE-Core rev: ee98c2b095b991901b6c2125b2428985c873b4bd) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: sync from openembeddedQing He2010-08-311-48/+51
| | | | | | | | | | | | this fixes: - toolchain detection error (e.g. ar and ranlib) changes from openembedded: - reformatting - cmake modules search path - use 'cat <<EOF' instead of echos for clarity Signed-off-by: Qing He <qing.he@intel.com>
* cmake.bbclass: sync from openembeddedQing He2010-08-271-7/+84
| | | | | | | | this fixes: - toolchain detection error (e.g. ar and ranlib) - cmake modules search path Signed-off-by: Qing He <qing.he@intel.com>
* cmake: only search root directory for FIND_***Kevin Tian2010-07-271-1/+4
| | | | | | | | | | | default cmake behavior for FIND_***, is to first search listed directories prefixed with CMAKE_FIND_ROOT_PATH, and if not found then go to unprefixed directories. This is not desired as build system may be referenced. this commit refine the search path only on prefixed directories, and thus fix libmusicbrains build failure on some systems Signed-off-by: Kevin Tian <kevin.tian@intel.com>
* cmake.bbclass: Make sure EXTRA_OECMAKE has a sane defaultRichard Purdie2010-07-211-0/+2
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* libproxy: Disabled webkit supportJeff Dike2010-07-211-1/+1
| | | | | | | | | | | | | This package changed from autoconf to cmake during the last recipe upgrade. This made the existing EXTRA_OECONF, which disabled wekbit support among other things, non-functional, which in turn, broke the build. This patch disables webkit in a CMAKE way by adding EXTRA_OECMAKE to the cmake class description, and setting it to "-DWEBKIT=no" in the libproxy recipe and also reproduces the EXTRA_OECONF settings. Signed-off-by: Jeff Dike <jdike@linux.intel.com>
* cmake.bbclass: added version from OE + cross-compilation supportMarcin Juszkiewicz2008-06-181-0/+11
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4688 311d38ba-8fff-0310-9ca6-ca027cbcb966
OpenPOWER on IntegriCloud