chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Fix #1133


From: Aleksej Saushev
Subject: Re: [Chicken-hackers] [PATCH] Fix #1133
Date: Thu, 03 Jul 2014 22:23:24 +0400
User-agent: Gnus/5.1299999999999999 (Gnus v5.13) Emacs/24.3 (berkeley-unix)

Yaroslav Tsarko <address@hidden> writes:

> Sure. First, please take a look at the following CMake wiki
> page: http://www.cmake.org/Wiki/CMake_Cross_Compiling.
>
> In addition to that many CMake commands already know how to
> properly work in cross-compilation mode (for example:
> find_library command
> http://www.cmake.org/cmake/help/v2.8.12/cmake.html#command:find_library).
>
> In common scenario all you need to do is to set up a few CMake
> variables to specify your cross-compilation target and CMake
> will handle many things automatically.
>
> As example (I used this to build CLucene library on my Ubuntu
> 12.04 system for Windows):
>
> cmake -D CMAKE_TOOLCHAIN_FILE=mingw-w64-toolchain.cmake -D 
> CMAKE_INSTALL_PREFIX=<path> ..
>
> where mentioned mingw-w64-toolchain.cmake file contains:
>
> SET(CMAKE_SYSTEM_NAME Windows)
> SET(GNU_HOST i686-w64-mingw32)
> SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
> SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
> SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
> SET(CMAKE_FIND_ROOT_PATH  <path-to-mingw32> )

This is exactly the demonstration why CMake's support for cross-compilation
is no better than Make's. The analogous code for Make is:

make CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ SYSROOT=<path-to-mingw32>

The most important part here is that you have to add it manually while autoconf
has almost all the useful stuff already inside.

In general, CMake doesn't solve any real problem of Make. In some aspects
it is a step back even. CMake is mostly equivalent to Make + some autotools.
The only Make's problem it does solve is the problem of divergent dialects.
CMake has only one. But that's triviality. We employ the same solution
by requiring bmake and ignoring all other dialects.
Otherwise CMake is "yet another tool" that requires additional maintainance.


-- 
HE CE3OH...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]