Hi all, I tried to cross-compile an internal application for windows on a linux machine, but failed, because cmake at some point re-start the configure process, and drops the CMAKE_SYSTEM_NAME variable along that way. Attached is a minimal CMakeLists.txt, which reproduces the problem.
Is there a way to avoid the reconfiguration? TIA R. Czerny Console output: someone@debian-vm:~/cross/build$ cmake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=i586-mingw32msvc-gcc -DCMAKE_RC_COMPILER=i586-mingw32msvc-windres .. -- The C compiler identification is GNU -- Check for working C compiler: /usr/bin/i586-mingw32msvc-gcc -- Check for working C compiler: /usr/bin/i586-mingw32msvc-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- CC=TRUE CSN=Windows -- Configuring done You have changed variables that require your cache to be deleted. Configure will be re-run and you may have to reset some variables. The following variables have changed: CMAKE_RC_COMPILER= i586-mingw32msvc-windres -- The C compiler identification is GNU -- Check for working C compiler: /usr/bin/i586-mingw32msvc-gcc -- Check for working C compiler: /usr/bin/i586-mingw32msvc-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- CC=FALSE CSN=Linux -- Configuring done -- Generating done -- Build files have been written to: /home/czerny/Quellen/hospec/foo/foo
cmake_minimum_required(VERSION 2.8) project(foo C) message(STATUS "CC=${CMAKE_CROSSCOMPILING} CSN=${CMAKE_SYSTEM_NAME}") add_executable(fo foo.c)
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake