Commit Graph

69 Commits

Author SHA1 Message Date
Michał Górny
ae269ba84b cmake-utils.eclass: Remove redundant enable_cmake-* functions
Closes: https://github.com/gentoo/gentoo/pull/4702
2017-05-22 16:43:38 +02:00
Andreas Sturmlechner
2261370960 cmake-utils.eclass: Drop _cmake_execute_optionally after WANT_CMAKE
Follow-up to d741b4ef50
2017-05-21 13:53:34 +02:00
David Seifert
77f6d963dd cmake-utils.eclass: Remove PREFIX variable
Closes: https://github.com/gentoo/gentoo/pull/4528
2017-05-21 11:25:18 +02:00
David Seifert
e913eed623 cmake-utils.eclass: Remove support for EAPIs 0 - 4
Closes: https://github.com/gentoo/gentoo/pull/4528
2017-05-21 11:25:13 +02:00
David Seifert
d741b4ef50 cmake-utils.eclass: Remove WANT_CMAKE and warn users
Closes: https://github.com/gentoo/gentoo/pull/4528
2017-05-21 11:25:07 +02:00
Michał Górny
b15a8079a7 cmake-utils.eclass: Use eninja from ninja-utils 2017-05-16 19:11:27 +02:00
Michael Palimaka
05b41eade5 cmake-utils.eclass: raise minimum version to 3.7.2 2017-03-18 13:54:32 +11:00
Robin H. Johnson
61b861acd7 Drop $Id$ per council decision in bug #611234.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2017-02-28 11:50:50 -08:00
Johannes Huber
b7af1a7c96 cmake-utils.eclass: Set CMAKE_MIN_VERSION to 3.6.3 2017-02-07 06:44:59 +01:00
Maciej Mrozowski
d9b6edbeec cmake-utils.eclass: set CMAKE_SYSTEM_PROCESSOR, certain buildsystems rely on this for crosscompiling. Patch by aballier, bug 607904 2017-02-07 00:01:57 +01:00
Johannes Huber
1eab10e398 cmake-utils.eclass: Drop EAPI 3
No consumers left.
2017-01-28 20:55:00 +01:00
Michał Górny
adfccec02c cmake-utils.eclass: Support running ctest in parallel
Pass -j and --test-load options (with values based on MAKEOPTS) to CTest
by default, in order to enable parallel test runs.
2017-01-07 11:23:58 +01:00
Johannes Huber
01ea813f15 cmake-utils.eclass: Set CMAKE_MIN_VERSION to 3.5.2 2017-01-01 17:32:10 +01:00
Johannes Huber
227f6bfdee cmake-utils.eclass: Set CMAKE_MIN_VERSION to 3.2.2 2016-12-23 11:11:25 +01:00
Michał Górny
ed24aa4f0f cmake-utils.eclass: Set assembly compiler & flags directly
Set the assembly compiler and flags directly instead of implicitly
forcing them in the build rule.
2016-12-08 09:00:17 +01:00
Michał Górny
4e427b97d5 cmake-utils.eclass: Split multi-arg CC/CXX/FC correctly, #542530
Split multi-argument CC/CXX/FC into a CMake array consisting of one
element containing the compiler path (name) and the other containing all
command-line options, space-separated. This is how CMake splits
the environment variables CC/CXX/FC internally.

The alternative would be to set CC/CXX/FC directly, and let CMake handle
the splitting. However, changing that had unforeseen consequences like
assembler not being set correctly (#601292) which in turn was impossible
to set via environment variables due to bugs in CMake.

Therefore, splitting the values into CMAKE_*_COMPILER correctly seems
the simplest and safest way forward, at least until we can rely on fixed
CMake versions being sufficiently deployed.
2016-12-08 09:00:17 +01:00
Michał Górny
def3d751f1 cmake-utils.eclass: Revert "export CC/CXX/FC to environment, #542530"
Revert using CC/CXX/FC envvars since it breaks implicit assembler
override and is non-trivial to fix, #601292.
2016-12-02 11:15:53 +01:00
Michał Górny
14bbe0bedd cmake-utils.eclass: Revert "Set assembler correctly, #601292"
Revert setting ASM=${CC}. It turns out that CMake is not splitting
arguments in ASM like in CC, so this effectively broke all multilib
builds.
2016-12-02 11:15:52 +01:00
Michał Górny
81e9f9f0a3 cmake-utils.eclass: Unset BUILD_TYPE-specific ASM flags 2016-12-01 23:39:35 +01:00
Michał Górny
cbf4efdad9 cmake-utils.eclass: Set assembler correctly, #601292
Use <CMAKE_ASM_COMPILER> in the assembly compile command in order to fix
building assembly files. It turns out that <CMAKE_C_COMPILER> is no
longer correctly evaluated in that command once it is no longer set
explicitly in the toolchain file and passed through the environment
instead.

Pass ASM and ASMFLAGS (equal to CC and CFLAGS) appropriately to enforce
using the correct compiler.
2016-12-01 23:39:33 +01:00
Michał Górny
92700a0e7b cmake-utils.eclass: Wipe out default flags for std build types
Wipe out the default compiler & linker flags that are forced by CMake
for the standard build types. This improves the sanity of the build if
we are forced to use one of those types.
2016-11-30 10:42:11 +01:00
Michał Górny
c9b53dc891 cmake-utils.eclass: Declare CMAKE_GENTOO_BUILD
Declare the CMAKE_GENTOO_BUILD cache variable to indicate that a Gentoo
package build is being performed. This variable enables Gentoo code
paths in CMake modules without the necessity of setting a custom
CMAKE_BUILD_TYPE.
2016-11-30 10:42:09 +01:00
Michał Górny
66483a9335 cmake-utils.eclass: Export PKG_CONFIG as envvar rather than build rule 2016-11-27 12:42:43 +01:00
Maciej Mrozowski
5132424e60 cmake-utils.eclass: export CC/CXX/FC to environment, #542530 2016-11-27 12:42:39 +01:00
Michał Górny
0f90bcc5ad cmake-utils.eclass: Move CMAKE_AR & CMAKE_RANLIB into toolchain defs
Move CMAKE_AR & CMAKE_RANLIB definitions into the toolchain file. It
seems to make more sense there than in build rules.
2016-11-27 12:42:37 +01:00
Lars Wendler
618a26ab97 Revert "cmake-utils.eclass: print feature summary"
This reverts commit ac8c7b0f47.

Makes packages with custom FEATURE_SUMMARY fail as can be seen in
https://bugs.gentoo.org/593230
2016-09-08 22:13:06 +02:00
Christoph Junghans
ac8c7b0f47 cmake-utils.eclass: print feature summary
Closes: https://github.com/gentoo/gentoo/pull/2139

Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
2016-09-08 15:12:48 +02:00
Andreas Sturmlechner
aa8f73fd21 cmake-utils.eclass: Let cmake_comment_add_subdirectory take n arguments 2016-09-01 00:23:26 +10:00
Maciej Mrozowski
e6a35d9aa4 cmake-utils.eclass: Expand suggestion related to functions banned EAPI 6
This reverts commit 14994bc488.
2016-08-05 01:47:12 +02:00
Michael Palimaka
1a15ca759e cmake-utils.eclass: echo ctest arguments
This mirrors the behaviour during src_configure where cmake and its arguments
are printed for clarity.
2016-06-17 03:56:24 +10:00
Michael Palimaka
ec1cf28c6d cmake-utils.eclass: do not pass CMAKE_INSTALL_DO_STRIP in EAPI 6 and later
CMAKE_INSTALL_DO_STRIP does not appear to be widely used, so this is a good
opportunity to get rid of it.
2016-06-17 03:56:24 +10:00
Michał Górny
58f3cda1c9 cmake-utils.eclass: _ninjaopts_from_makeopts, fix plain '-j' and '-l'
Fix the _ninjaopts_from_makeopts to handle no-parameter '-j' and '-l'
options correctly and convert them to appropriate parametrized ninja
options.
2016-05-26 10:09:57 +02:00
Michał Górny
65719e6773 cmake-utils.eclass: _ninjaopts_from_makeopts, fix handling of -k
Fix _ninjaopts_from_makeopts to handle -k correctly. Make does not
support parameters to -k, while ninja requires one. Therefore, handle
only a single '-k' and convert it into '-k 0' (no limit of failing
tasks).
2016-05-26 10:09:57 +02:00
Maciej Mrozowski
14994bc488 cmake-utils.eclass: Remove incorrect suggestions related to eclass functions removed since EAPI 6 2016-05-18 22:23:27 +02:00
Maciej Mrozowski
3600c714eb cmake-utils.eclass: enable CMAKE_WARN_UNUSED_CLI for EAPI 6 2016-05-18 01:15:57 +02:00
Michael Palimaka
385fc99384 cmake-utils.eclass: check for ninja with ROOT=/
Gentoo-bug: 577244
2016-04-03 01:50:43 +11:00
Michael Palimaka
38b0fc51d3 cmake-utils.eclass: replace spaces with tabs 2016-03-18 17:17:53 +11:00
Andreas Sturmlechner
b539bb4ed0 cmake-utils.eclass: Fix typo 2016-03-02 03:37:34 +11:00
Mike Frysinger
1833195f44 cmake-utils.eclass: drop findutils dep #262965
The forced upgrade has been moved to @system now.
2016-02-10 14:40:27 -05:00
Justin Lecher
56f8075e23 cmake-utils.eclass: Merge consecutive [[ ]] into single [[ ]]
Signed-off-by: Justin Lecher <jlec@gentoo.org>
2016-01-28 08:51:26 +01:00
Justin Lecher
6dd449a09d cmake-utils.eclass: Fix inverted logic on EAPI check
Gentoo-Bugs: https://bugs.gentoo.org/show_bug.cgi?id=573132

Signed-off-by: Justin Lecher <jlec@gentoo.org>
2016-01-28 08:51:10 +01:00
Justin Lecher
321894120d cmake-utils.eclass: Drop empty line
Signed-off-by: Justin Lecher <jlec@gentoo.org>
2016-01-27 10:44:49 +01:00
Justin Lecher
5f41f024c7 cmake-utils.eclass: Use bash internal testing instead of has()
Signed-off-by: Justin Lecher <jlec@gentoo.org>
2016-01-27 10:44:49 +01:00
Michael Palimaka
e9307cfd1b cmake-utils.eclass: enable EAPI 6 2016-01-26 01:07:08 +11:00
Michael Palimaka
e9116b1aeb cmake-utils.eclass: ban helper functions in EAPI 6 and later
The affected helpers are:

* cmake-utils_use_build
* cmake-utils_use_disable
* cmake-utils_use_enable
* cmake-utils_use_has
* cmake-utils_use_no
* cmake-utils_use_use
* cmake-utils_use_want
* cmake-utils_use_with
* cmake-utils_use
* cmake-utils_useno

https://archives.gentoo.org/gentoo-dev/message/6ff6dedb44fff4289764dc5eb960e1c6

Gentoo-bug: 514384
2016-01-26 01:07:07 +11:00
Michael Palimaka
6f2b78164f cmake-utils.eclass: require two arguments for cmake-utils_use_find_package in EAPI 6 and later
This will allow us to remove the capitalisation variants code later.
2016-01-26 01:07:07 +11:00
Michael Palimaka
a40546f88e cmake-utils.eclass: use default_src_prepare in EAPI 6 and later 2016-01-26 01:07:07 +11:00
Michael Palimaka
fc25e35719 cmake-utils.eclass: ban non-array usage of mycmakeargs in EAPI 6 and later 2016-01-26 01:07:06 +11:00
Michael Palimaka
66f8e27bf3 cmake-utils.eclass: move $S modifications to src_prepare in EAPI 6 and later
This is the correct phase for source modifications, and additionally avoids a
multilib race condition.

Gentoo-bug: 513170
2016-01-26 01:07:06 +11:00
Michael Palimaka
e4b034ec87 cmake-utils.eclass: namespace some private functions 2016-01-26 01:07:05 +11:00