[CMake] mingw crosscompile error: invalid option `macosx-version-min=10.5' ?
Alexander Neundorf
a.neundorf-work at gmx.net
Sun Jan 10 14:11:23 EST 2010
On Sunday 10 January 2010, Claus Klein wrote:
> On 08.01.2010, at 02:21, Alexander Neundorf wrote:
> > On Wednesday 06 January 2010, Claus Klein wrote:
> >> Yes, I did it again and again with rm -rf build.
> >> Same result!
> >>
> >> As I said: "The problem occurs always when I run cmake again, no
> >> matter of Windows or Windows-gcc is used."
> >
> > I don't see a way how cmake itself should come up with "Windows-gcc"
> > as system
> > name.
> > So, if you start with a clean build dir, set CMAKE_SYSTEM_NAME to
> > "Windows"
> > properly (i.e. either via a toolchain file or via -D during the
> > initial cmake
> > invocation), how does your results look ?
> >
> > Alex
>
> Hi Alex,
>
> the problem occurs only if I call cmake 2 times with the same arguments:
>
> cmake -DCMAKE_C_COMPILER=i386-mingw32-gcc -DCMAKE_CXX_COMPILER=i386-
> mingw32-g++ -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_INSTALL_PREFIX=C:/usr ..
> ### OK
>
> cmake -DCMAKE_C_COMPILER=i386-mingw32-gcc -DCMAKE_CXX_COMPILER=i386-
> mingw32-g++ -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_INSTALL_PREFIX=C:/usr ..
> ### ERROR
>
> The after the first time with SystemName and compiler settings, I
> should only run:
>
> cmake ..
> # then it works.
Interesting, I'll have a look.
But anyway, you should need the arguments indeed only on the initial cmake
run.
Afterwards they are already cached. To rerun cmake, you can also just point
cmake to an existing builddir (e.g. "cmake .") or enter "make rebuild_cache"
or run ccmake or cmake-gui.
>
> Sorry about the noise.
>
> About this SystemName "Windows-gcc"
> It is also listed as example on this page:
> http://www.cmake.org/Wiki/CMake_Cross_Compiling#Setting_up_the_system_and_t
>oolchain
Ah, ok this seems to be not completely clear on that page.
There, "Windows-gcc.cmake" is constructed from CMAKE_SYSTEM_NAME and the
name of the compiler. So CMAKE_SYSTEM_NAME really should be only "Windows".
Alex
More information about the CMake
mailing list