No, I can't find this option in any cmake file.
It seems the detecting if we are CROSS_COMPILING does not work well on
DARWIN?
Wenn the error occured, CMAKE_OSX_DEPLOYMENT_TARGET is set in
CMakeCache.txt:
...
-- Configuring incomplete, errors occurred!
claus-kleins-macbook-pro:build clausklein$ grep OSX CMakeCache.txt
//Build architectures for OSX
CMAKE_OSX_ARCHITECTURES:STRING=
CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.5
CMAKE_OSX_SYSROOT:PATH=/Developer/SDKs/MacOSX10.5.sdk
Then only this helps:
cmake -DCMAKE_C_COMPILER=i386-mingw32-gcc -DCMAKE_CXX_COMPILER=i386-
mingw32-g++ -DCMAKE_SYSTEM_NAME=Windows-gcc -
DCMAKE_OSX_DEPLOYMENT_TARGET='' ..
Initial, this works too, but not if CMAKE_OSX_DEPLOYMENT_TARGET is set:
cmake -DCMAKE_C_COMPILER=i386-mingw32-gcc -DCMAKE_CXX_COMPILER=i386-
mingw32-g++ -DCMAKE_SYSTEM_NAME=Windows-gcc -DCMAKE_CROSSCOMPILING=1 ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /opt/local/bin/i386-mingw32-gcc
-- Check for working C compiler: /opt/local/bin/i386-mingw32-gcc --
works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/local/bin/i386-mingw32-g++
-- Check for working CXX compiler: /opt/local/bin/i386-mingw32-g++ --
works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/clausklein/Workspace/cmake/
GNU_style/build
Thanks to all
Claus
On 03.01.2010, at 17:42, Michael Jackson wrote:
This is probably a "bug" in the Darwin-gcc.cmake file that gets
called to initialize all the compilers and flags. There is a bunch
of code which tries to figure out which OS X version you are
compiling for and what flags to use. I say this because there
probably needs to be an
IF( NOT CROSS_COMPILING)
ENDIF()
around that whole section.
What you can do is look in CMake 2.6-4.app/Contents/share/cmake-2.6/
Modules/Platform/Darwin.cmake
Put some "MESSAGE(STATUS "I AM HERE" ) in that file to try and track
down what modules are being compiled. If you get something working,
post a patch back to the list so the fixes can be incorporated into
the next release. You will DEFINITELY want to submit a bug report at
http://public.kitware.com/Bug/view_all_bug_page.php
Mike
On Jan 3, 2010, at 8:22 AM, Claus Klein wrote:
Thanks Bart,
I have xcode installed, but not every compiler on my MAC compiles
for MAC-OS.
I have mingw32 installed from macports, and the target is Win32, so
this option test
"-mmacosx-version-min= The earliest MacOS X version on which
this program will run"
makes no sence and not every compiler on a MAC support this!
-------------------------
claus-kleins-macbook-pro:gcc clausklein$ for c in gcc powerpc-apple-
darwin9-gcc-4.2.1 i386-mingw32-gcc; do which $c; $c --version; $c --
target-help 2>&1 | grep -w MacOS; done
/usr/bin/gcc
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
-mmacosx-version-min= The earliest MacOS X version on which
this program will run
/usr/bin/powerpc-apple-darwin9-gcc-4.2.1
powerpc-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5566)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
-mmacosx-version-min= The earliest MacOS X version on which
this
/opt/local/bin/i386-mingw32-gcc
i386-mingw32-gcc (GCC) 3.4.5 (mingw-vista special r2)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
claus-kleins-macbook-pro:gcc clausklein$ !tre
tree -d
.
|-- darwin
| |-- i386
| |-- ppc
| |-- ppc64
| `-- x86_64
|-- i686-apple-darwin9
| |-- 4.0.1
| | `-- install-tools
| `-- 4.2.1
| `-- install-tools
`-- powerpc-apple-darwin9
|-- 4.0.1
| `-- install-tools
`-- 4.2.1
`-- install-tools
15 directories
claus-kleins-macbook-pro:gcc clausklein$ pwd
/Developer/usr/libexec/gcc
claus-kleins-macbook-pro:gcc clausklein$
---------------------------------------------------------
One aspect of Cross-compiling is to compile for an other
architecture and another OS, I think.
Claus
On 03.01.2010, at 03:36, Bart Nabbe wrote:
i think you do not have the 10.5software development code from
apple installed.
it comes with xcode if you select the 10.5 sdk
this is from memory, so just give it a brief check.
On Jan 2, 2010, at 18:30, Claus Klein wrote:
I have problems to crosscompile on MAC-OS for MinGW.
How kann I prevent this strange compiler flag on a Darwin
Plattform?
Thanks
Claus
-----------------------------------------
cmake -DCMAKE_C_COMPILER=i386-mingw32-gcc -
DCMAKE_CXX_COMPILER=i386-mingw32-g++ --debug-trycompile --debug-
output -DCMAKE_SYSTEM_NAME=Windows-gcc ..
_______________________________________________
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
_______________________________________________
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