aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2015-11-03 13:41:04 +0100
committerMichael Palimaka <kensington@gentoo.org>2015-11-04 23:34:27 +1100
commit7f03821876f1a7884396057f315013c3622b4609 (patch)
treecd318dc08c5fc6f57bbfd5c027d976cc7ff28f6c
parentkde-plasma/ksysguard: processui USE flag was removed from kde-plasma/libksysg... (diff)
downloadkde-7f038218.tar.gz
kde-7f038218.tar.bz2
kde-7f038218.zip
cmake-utils.eclass: Prepare for cmake-3.4
-rw-r--r--eclass/cmake-utils.eclass20
1 files changed, 15 insertions, 5 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index c92759d3c5..2ebde45f17 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -121,7 +121,7 @@ case ${WANT_CMAKE} in
CMAKEDEPEND+="${WANT_CMAKE}? ( "
;;
esac
-inherit toolchain-funcs multilib flag-o-matic eutils
+inherit toolchain-funcs multilib flag-o-matic eutils versionator
case ${EAPI} in
2|3|4|5) : ;;
@@ -461,12 +461,22 @@ enable_cmake-utils_src_configure() {
# Prepare Gentoo override rules (set valid compiler, append CPPFLAGS etc.)
local build_rules=${BUILD_DIR}/gentoo_rules.cmake
+ # Since cmake-3.4.0_rc1 "<FLAGS>" no longer contains includes and thus
+ # we need to add "<INCLUDES>"
+ local includes=
+ if [[ ${PN} == cmake ]] ; then
+ if $(version_is_at_least 3.4.0 $(get_version_component_range 1-3 ${PV})) ; then
+ includes="<INCLUDES>"
+ fi
+ elif has_version \>=dev-util/cmake-3.4.0_rc1 ; then
+ includes="<INCLUDES>"
+ fi
cat > "${build_rules}" <<- _EOF_ || die
SET (CMAKE_AR $(type -P $(tc-getAR)) CACHE FILEPATH "Archive manager" FORCE)
- SET (CMAKE_ASM_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${CFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE)
- SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE)
- SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
- SET (CMAKE_Fortran_COMPILE_OBJECT "<CMAKE_Fortran_COMPILER> <DEFINES> ${FCFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "Fortran compile command" FORCE)
+ SET (CMAKE_ASM_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${includes} ${CFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE)
+ SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE)
+ SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
+ SET (CMAKE_Fortran_COMPILE_OBJECT "<CMAKE_Fortran_COMPILER> <DEFINES> ${includes} ${FCFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "Fortran compile command" FORCE)
SET (CMAKE_RANLIB $(type -P $(tc-getRANLIB)) CACHE FILEPATH "Archive index generator" FORCE)
SET (PKG_CONFIG_EXECUTABLE $(type -P $(tc-getPKG_CONFIG)) CACHE FILEPATH "pkg-config executable" FORCE)
_EOF_