cmake-utils.eclass: Move CMAKE_AR & CMAKE_RANLIB into toolchain defs
authorMichał Górny <mgorny@gentoo.org>
Sun, 27 Nov 2016 11:17:22 +0000 (12:17 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sun, 27 Nov 2016 11:42:37 +0000 (12:42 +0100)
Move CMAKE_AR & CMAKE_RANLIB definitions into the toolchain file. It
seems to make more sense there than in build rules.

eclass/cmake-utils.eclass

index 393ee28a26ad94659a73fb073c91f39731ad3713..1cf08cd48740d1ee1f138ec78f7ea5546fd8f52d 100644 (file)
@@ -517,12 +517,10 @@ enable_cmake-utils_src_configure() {
                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> ${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_
 
@@ -531,6 +529,8 @@ enable_cmake-utils_src_configure() {
                SET (CMAKE_C_COMPILER $(tc-getCC))
                SET (CMAKE_CXX_COMPILER $(tc-getCXX))
                SET (CMAKE_Fortran_COMPILER $(tc-getFC))
+               SET (CMAKE_AR $(type -P $(tc-getAR)) CACHE FILEPATH "Archive manager" FORCE)
+               SET (CMAKE_RANLIB $(type -P $(tc-getRANLIB)) CACHE FILEPATH "Archive index generator" FORCE)
        _EOF_
 
        if tc-is-cross-compiler; then