<feed xmlns='http://www.w3.org/2005/Atom'>
<title>buildroot/package/pkg-cmake.mk, branch 2017.02</title>
<subtitle>OpenPOWER buildroot sources</subtitle>
<id>https://git.raptorcs.com/git/buildroot/atom?h=2017.02</id>
<link rel='self' href='https://git.raptorcs.com/git/buildroot/atom?h=2017.02'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/'/>
<updated>2017-02-26T21:40:01+00:00</updated>
<entry>
<title>pkg-cmake: pass &lt;pkg&gt;_CONF_ENV for the target configure step</title>
<updated>2017-02-26T21:40:01+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2017-02-26T17:42:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=fc4250119582043bf57a6296ae0264aa95f97fac'/>
<id>urn:sha1:fc4250119582043bf57a6296ae0264aa95f97fac</id>
<content type='text'>
The Buildroot manual documents that &lt;pkg&gt;_CONF_ENV is passed in the
environment when calling cmake during the configure step. However, the
actual implementation in pkg-cmake passes HOST_&lt;pkg&gt;_CONF_ENV when
configuring the host variant of a cmake package, but does not pass
&lt;pkg&gt;_CONF_ENV when configuring the target variant of a cmake package.

This commit fixes that by passing &lt;pkg&gt;_CONF_ENV in the environment as
expected. It should not cause any behavior change, because this
feature is in fact not used by any package in upstream Buildroot:

$ grep CONF_ENV $(git grep -l cmake-package package/)
package/pkg-cmake.mk:$(2)_CONF_ENV			?=
package/pkg-cmake.mk:	$$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \
package/pkg-cmake.mk:	$$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \

This issue was reported by Olivier &lt;ovalentin@awox.com&gt; as bug #9616.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Reviewed-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>package/pkg-cmake.mk: move CMAKE_BUILD_TYPE definition into toolchainfile.cmake</title>
<updated>2016-10-22T14:15:32+00:00</updated>
<author>
<name>Samuel Martin</name>
<email>s.martin49@gmail.com</email>
</author>
<published>2016-10-16T11:12:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=a471150a7b773b40af5585fa0c49275549014791'/>
<id>urn:sha1:a471150a7b773b40af5585fa0c49275549014791</id>
<content type='text'>
The chosen CMAKE_BUILD_TYPE encodes an option of the Buildroot
configuration, so it makes more sense to save it in the
toolchainfile.cmake than to pass it during configure.

It is still possible to override the build type on the cmake
command line.

Cc: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Cc: Maxime Hadjinlian &lt;maxime.hadjinlian@gmail.com&gt;
Signed-off-by: Samuel Martin &lt;s.martin49@gmail.com&gt;
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
[Thomas: reword description in the CHANGES file.]
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>Revert "package/cmake: with BR2_ENABLE_DEBUG use RelWithDebInfo"</title>
<updated>2016-10-22T14:14:07+00:00</updated>
<author>
<name>Samuel Martin</name>
<email>s.martin49@gmail.com</email>
</author>
<published>2016-10-16T11:12:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=104bb29e0490bfb487e2e665448dd3ca07fcc2b5'/>
<id>urn:sha1:104bb29e0490bfb487e2e665448dd3ca07fcc2b5</id>
<content type='text'>
This reverts commit 4b0120183404913f7f7788ef4f0f6b51498ef363.

Before reverting this patch, CMake packages are built with the following
options:
  * if BR2_ENABLE_DEBUG is set:
    The CMake build type is set to RelWithDebInfo, which means:
    - Optimization level is forced to: -O2;
    - no log nor assert due to -DNDEBUG;
    - BR2_DEBUG_{1..3} effect is unchanged;
  * otherwise:
    The CMake build type is set to Release, which means:
    - Optimization level is forced to: -O3;
    - no log nor assert due to -DNDEBUG (as expected).
  In any case, the optimization WRT the binary size is always ignored
  and forced.

Reverting to the previous situation, so Buildroot now chooses between
the 'Debug' and 'Release' config types, which are semantically closer
to what Buildroot does everywhere else:
  * if BR2_ENABLE_DEBUG is set:
    The CMake build type is set to Debug, which means:
    - only -g option is passed by CMake;
    - optimization is not forced, nor debug level, so they are kept
      as-is;
  * otherwise:
    The CMake build type is set to Release, so no change in this case:
    - Optimization level is forced to: -O3;
    - no log nor assert due to -DNDEBUG (as expected);
    - size optimization is ignored.

Follow-up patches will fix the CMake flag variables that are appended by
CMake.

Cc: Charles Hardin &lt;ckhardin@exablox.com&gt;
Cc: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Cc: Maxime Hadjinlian &lt;maxime.hadjinlian@gmail.com&gt;
Signed-off-by: Samuel Martin &lt;s.martin49@gmail.com&gt;
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>core: don't build host-cmake if it is available on the build host</title>
<updated>2016-09-17T14:12:06+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca@lucaceresoli.net</email>
</author>
<published>2016-09-12T21:59:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=c2d80a8c5d8b97cdc84c297a3d2d6896fff6560b'/>
<id>urn:sha1:c2d80a8c5d8b97cdc84c297a3d2d6896fff6560b</id>
<content type='text'>
Currently all cmake packages depend on host-cmake. Unfortunately
host-cmake takes a long time to configure and build: almost 7 minutes
on a dual-core i5 with SSD. The time does not change even with ccache
enabled.

Indeed, building host-cmake is avoidable if it is already installed on
the build host: CMake is supposed to be quite portable, and the only
patch in Buildroot for the CMake package seems to only affect
target-cmake.

Thus we automatically skip building host-cmake and use the one on the
system if:
 - cmake is available on the system and
 - it is recent enough.

First, we leverage the existing infrastructure in
support/dependencies/dependencies.mk to find out whether there's a
suitable cmake executable on the system. Its path can be passed in the
BR2_CMAKE environment variable, otherwise it defaults to "cmake". If
it is enabled, found and suitable then we set BR2_CMAKE_HOST_DEPENDENCY
to empty; otherwise we set BR2_CMAKE_HOST_DEPENDENCY to 'host-cmake' and
override BR2_CMAKE with "$(HOST_DIR)/usr/bin/cmake" to revert to using
our own cmake (the old behaviour).

Then in pkg-cmake.mk we replace the hard-coded dependency on host-cmake
to using the BR2_CMAKE_HOST_DEPENDENCY variable, and we use $(BR2_CMAKE)
instead of $(HOST_DIR)/usr/bin/cmake.

Unlike what we do for host-tar and host-xzcat, for host-cmake we do
not add host-cmake to DEPENDENCIES_HOST_PREREQ. If we did, host-cmake
would be a dependency for _any_ package when it's not installed on the
host, even when no cmake package is selected.

Cmake versions older than 3.0 are affected by the bug described and
fixed in Buildroot in ef2c1970e4bf ("cmake: add patch to fix Qt mkspecs
detection"). The bug was fixed in upstream CMake in version 3.0 [0].

Amongst all the cmake packages currently in Buildroot, the currently
highest version mentioned in cmake_minimum_required() is 3.1 (grantlee
and opencv3).

Thus we use 3.1 as the lowest required cmake for now, until a package is
bumped, or a new package added, with a higher required version.

[0] https://cmake.org/gitweb?p=cmake.git;h=e8b8b37ef6fef094940d3384df5a1d421b9fa568

Signed-off-by: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Cc: Samuel Martin &lt;s.martin49@gmail.com&gt;
Cc: Davide Viti &lt;zinosat@tiscali.it&gt;
Cc: Arnout Vandecappelle &lt;arnout@mind.be&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Reviewed-by: Romain Naour &lt;romain.naour@gmail.com&gt;
Tested-by: Romain Naour &lt;romain.naour@gmail.com&gt;
[yann.morin.1998@free.fr:
  - simplify logic in check-host-cmake.mk;
  - set and use BR2_CMAKE_HOST_DEPENDENCY, drop USE_SYSTEM_CMAKE;
  - bump to cmake 3.1 for grantlee and opencv;
]
Signed-off-by: Yann E. MORIN &lt;yann.morin.1998@free.fr&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>cmake: move the host-pkgconf dependency from host-cmake to pkg-cmake</title>
<updated>2016-07-05T10:18:36+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca@lucaceresoli.net</email>
</author>
<published>2016-07-01T15:53:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=6ab3383f76c4e9f7151c4fce103e5ff7d5b6eb98'/>
<id>urn:sha1:6ab3383f76c4e9f7151c4fce103e5ff7d5b6eb98</id>
<content type='text'>
In 3d475ee0ba4d6eea6aca25594cfe5bb153ac804f a dependency on
host-pkgconf was added to host-cmake. It is a workaround to fix build
failures for packages that use pkgconf through a cmake module, but do
not depend on host-pkgconf as they should.

Since it is the package that needs host-pkgconf and not host-cmake
itself, move the dependency to the proper place, in pkg-cmake.mk.

Also copy the explanation on the mentioned commit as a comment in
order to clarify why we do this.

Signed-off-by: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Cc: Samuel Martin &lt;s.martin49@gmail.com&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Cc: Davide Viti &lt;zinosat@tiscali.it&gt;
Cc: Arnout Vandecappelle &lt;arnout@mind.be&gt;
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Reviewed-by: "Yann E. MORIN" &lt;yann.morin.1998@free.fr&gt;
[Thomas:
 - update on top of master
 - drop empty HOST_CMAKE_DEPENDENCIES, no longer needed since host
   dependencies are no longer derived from target dependencies.]
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>pkg-cmake.mk: export the fortran compiler path in the CMake toolchain file</title>
<updated>2016-07-03T14:58:11+00:00</updated>
<author>
<name>Samuel Martin</name>
<email>s.martin49@gmail.com</email>
</author>
<published>2016-07-03T13:47:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=019ba1dc5283864405f966fbbf9ce799a06f7c27'/>
<id>urn:sha1:019ba1dc5283864405f966fbbf9ce799a06f7c27</id>
<content type='text'>
Since the fortran support is conditional, only enable it when needed.

Signed-off-by: Samuel Martin &lt;s.martin49@gmail.com&gt;
Signed-off-by: Vicente Olivert Riera &lt;Vincent.Riera@imgtec.com&gt;
Cc: Benjamin Kamath &lt;bkamath@spaceflight.com&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>infra: remove auto derivation of host dependencies</title>
<updated>2016-07-03T08:24:02+00:00</updated>
<author>
<name>Julien Floret</name>
<email>julien.floret@6wind.com</email>
</author>
<published>2016-07-02T22:21:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=4bdb067e380e72c3a6cb9c6ccf3791a6cf8661e0'/>
<id>urn:sha1:4bdb067e380e72c3a6cb9c6ccf3791a6cf8661e0</id>
<content type='text'>
This feature consists in automatically deducing dependencies of a host
package from the dependencies of the target variant.

However, it causes some issues, and many host packages need different
dependencies than their target variants.

Now that host dependencies are explicitly set for all packages, we can
remove it.

Signed-off-by: Julien Floret &lt;julien.floret@6wind.com&gt;
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>package/cmake: with BR2_ENABLE_DEBUG use RelWithDebInfo</title>
<updated>2016-07-01T21:36:16+00:00</updated>
<author>
<name>Charles Hardin</name>
<email>ckhardin@exablox.com</email>
</author>
<published>2016-05-21T20:08:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=4b0120183404913f7f7788ef4f0f6b51498ef363'/>
<id>urn:sha1:4b0120183404913f7f7788ef4f0f6b51498ef363</id>
<content type='text'>
&gt;From the documentation on BR2_ENABLE_DEBUG, the intention is to get
a build with debug symbols and not a "debug build" since that can have
the unintended consequence of being a different code path then a
release build type definition.

Switch the "Debug" to "RelWithDebInfo" in the cmake package support
to accomodate getting the debug symbols and still be a release
build.

Signed-off-by: Charles Hardin &lt;ckhardin@exablox.com&gt;
Reviewed-by: Samuel Martin &lt;s.martin49@gmail.com&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>package-cmake: remove now-redundant target ccache support</title>
<updated>2015-10-04T16:22:20+00:00</updated>
<author>
<name>Arnout Vandecappelle</name>
<email>arnout@mind.be</email>
</author>
<published>2015-10-04T12:28:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=e31ad0e809ca2cc75d16ac8f6c4ae3c850e828a6'/>
<id>urn:sha1:e31ad0e809ca2cc75d16ac8f6c4ae3c850e828a6</id>
<content type='text'>
All the complexity with the different ways that CMAKE_C_COMPILER and
CMAKE_C_COMPILER_ARG1 can be set are no longer needed, it's all handled
by the toolchain wrapper now.

Note that it is still necessary to handle this for the host build.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Reviewed-by: Romain Naour &lt;romain.naour@openwide.fr&gt;
Signed-off-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
</content>
</entry>
<entry>
<title>pkg-cmake: change sed expression delimiter</title>
<updated>2015-09-22T14:23:23+00:00</updated>
<author>
<name>Gustavo Zacarias</name>
<email>gustavo.zacarias@free-electrons.com</email>
</author>
<published>2015-09-21T18:57:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/buildroot/commit/?id=d90b1d74cb78f5668d49fe8262290eaff1d61a1d'/>
<id>urn:sha1:d90b1d74cb78f5668d49fe8262290eaff1d61a1d</id>
<content type='text'>
Switch from : to # since CFLAGS can include :'s spilled in from
BR2_TARGET_OPTIMIZATION, for example:

BR2_TARGET_OPTIMIZATION="-Wl,-rpath,/lib:/usr/lib" would cause the sed
expression to fail thus breaking the build.

Signed-off-by: Gustavo Zacarias &lt;gustavo.zacarias@free-electrons.com&gt;
Reviewed-by: Samuel Martin &lt;s.martin49@gmail.com&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
</feed>
