1 |
commit: 7f03821876f1a7884396057f315013c3622b4609 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 3 12:41:04 2015 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 4 12:34:27 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=7f038218 |
7 |
|
8 |
cmake-utils.eclass: Prepare for cmake-3.4 |
9 |
|
10 |
eclass/cmake-utils.eclass | 20 +++++++++++++++----- |
11 |
1 file changed, 15 insertions(+), 5 deletions(-) |
12 |
|
13 |
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass |
14 |
index c92759d..2ebde45 100644 |
15 |
--- a/eclass/cmake-utils.eclass |
16 |
+++ b/eclass/cmake-utils.eclass |
17 |
@@ -121,7 +121,7 @@ case ${WANT_CMAKE} in |
18 |
CMAKEDEPEND+="${WANT_CMAKE}? ( " |
19 |
;; |
20 |
esac |
21 |
-inherit toolchain-funcs multilib flag-o-matic eutils |
22 |
+inherit toolchain-funcs multilib flag-o-matic eutils versionator |
23 |
|
24 |
case ${EAPI} in |
25 |
2|3|4|5) : ;; |
26 |
@@ -461,12 +461,22 @@ enable_cmake-utils_src_configure() { |
27 |
|
28 |
# Prepare Gentoo override rules (set valid compiler, append CPPFLAGS etc.) |
29 |
local build_rules=${BUILD_DIR}/gentoo_rules.cmake |
30 |
+ # Since cmake-3.4.0_rc1 "<FLAGS>" no longer contains includes and thus |
31 |
+ # we need to add "<INCLUDES>" |
32 |
+ local includes= |
33 |
+ if [[ ${PN} == cmake ]] ; then |
34 |
+ if $(version_is_at_least 3.4.0 $(get_version_component_range 1-3 ${PV})) ; then |
35 |
+ includes="<INCLUDES>" |
36 |
+ fi |
37 |
+ elif has_version \>=dev-util/cmake-3.4.0_rc1 ; then |
38 |
+ includes="<INCLUDES>" |
39 |
+ fi |
40 |
cat > "${build_rules}" <<- _EOF_ || die |
41 |
SET (CMAKE_AR $(type -P $(tc-getAR)) CACHE FILEPATH "Archive manager" FORCE) |
42 |
- SET (CMAKE_ASM_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${CFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE) |
43 |
- SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE) |
44 |
- SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE) |
45 |
- SET (CMAKE_Fortran_COMPILE_OBJECT "<CMAKE_Fortran_COMPILER> <DEFINES> ${FCFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "Fortran compile command" FORCE) |
46 |
+ SET (CMAKE_ASM_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${includes} ${CFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE) |
47 |
+ SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE) |
48 |
+ SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE) |
49 |
+ SET (CMAKE_Fortran_COMPILE_OBJECT "<CMAKE_Fortran_COMPILER> <DEFINES> ${includes} ${FCFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "Fortran compile command" FORCE) |
50 |
SET (CMAKE_RANLIB $(type -P $(tc-getRANLIB)) CACHE FILEPATH "Archive index generator" FORCE) |
51 |
SET (PKG_CONFIG_EXECUTABLE $(type -P $(tc-getPKG_CONFIG)) CACHE FILEPATH "pkg-config executable" FORCE) |
52 |
_EOF_ |