[CMake] crosscompiling: what happened after change cmakelists.txt?

Dave Milter davemilter at gmail.com
Wed Jan 12 07:48:09 EST 2011


Hi,

when I run cmake like this:
cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-sdk-gcc.cmake
-DMY_TOOLCHAIN_PATH=$HOME/toolchains/sdk/ path/to/CMakeLists.txt

with toolchain-sdk-gcc.cmake:

SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)

SET(QT_QMAKE_EXECUTABLE ${MY_TOOLCHAIN_PATH}/bin/qmake)

# specify the cross compiler
SET(CMAKE_C_COMPILER   ${MY_TOOLCHAIN_PATH}/bin/arm-angstrom-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER ${MY_TOOLCHAIN_PATH}/bin/arm-angstrom-linux-gnueabi-g++)

all works fine,  it found suitable qt build for ARM,
but later if I modify CMakeLists.txt and type "make",
it lose right path to qmake (but right path to , replace it with path
to system qt, build for x86.

So question, how can I force cmake to cache

QT_QMAKE_EXECUTABLE like CMAKE_C_COMPILER, and do not lose
right path to qmake?


More information about the CMake mailing list