[Cmake] Force a generator?

Schumacher, Gordon gordon_schumacher at maxtor.com
Mon, 26 Apr 2004 13:55:52 -0600


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C42BC8.7AA1FCCE
Content-Type: text/plain

# From: Andy Cedilnik [mailto:andy.cedilnik at kitware.com]
# Sent: Monday, April 26, 2004 12:19 PM
# To: Schumacher, Gordon
# Cc: CMake List (E-mail)
# Subject: RE: [Cmake] Force a generator?
# 
# Hi Gordon,
# 
# On Mon, 2004-04-26 at 14:04, Schumacher, Gordon wrote:
#> Let me clarify a little... I'm using CMake in an unusual circumstance.
#> Our application is portable on both multiple hosts *and* targets; we
#> don't support "cross-compiling" per se, but we do as far as CMake is
#> concerned.  That's because one of our target platforms is DOS DJGPP,
#> which is 32-bit extended DOS.  I intend to run CMake under Windows, using

#> the DOS build tools (and, perhaps someday, explicitly call "i386-
#> msdosdjgpp-gcc" cross-build tools, but that's down the road.)  The point
#> is, even running the native DJGPP "gcc" and "make", it's still using a
#> Win32 version of CMake... so from CMake's point of view, it's a cross-
#> build.
# 
# That sounds cool. Any issues with that setup?

Not so far; I'm still getting everything hooked up, but it all seems to
work.  The main reason I'd eventually like to move to native CygWin versions
of the GNU build tools is because there are some pretty nasty limitations
of the DJGPP toolset (redirection is pretty broken, for instance) but the
CMake<->DJGPP interaction seems to work just fine, which is pretty
impressive really.

CMake got my attention since we've also got two different driver sets (NT4
and WDM) that we'd like to incorporate into the build system, and there's a
very high likelihood that we'll also eventually have the code running under
Linux.  It sorta-kinda did once upon a time, before we lost people, and
they're telling us it's gonna need to happen again... so having a Single
Makefile is very attractive.

Being able to build the whole thing on a single host platform, using cross-
build tools, would be even better...

# You can sort of do it. It's a hack, but try this. Write this 
# mess into a file let say target_detect.cmake:
# IF(TARGET MATCHES dos32)
#    SET(GENERATOR "Unix Makefiles")
# ENDIF(TARGET MATCHES dos32)
# IF(TARGET MATCHES dos32)
#   SET(GENERATOR "Visual Studio 6")
# ENDIF(TARGET MATCHES dos32)
# 
# Then run cmake:
# 
# cmake -DTARGET:STRING=dos32 -Ctarget_detect.cmake
# 
# Works here...
# 
# Otherwise, put feature request for this on the bug tracker.

So, if I'm understanding this right, the parser runs things passed in on the
command line to -C switches before it parses CMakeLists.txt, yes?

I'll let you know what I find when I get the whole thing bolted together...

------_=_NextPart_000_01C42BC8.7AA1FCCE
Content-Type: application/ms-tnef
Content-Transfer-Encoding: base64

eJ8+IiETAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy
b3NvZnQgTWFpbC5Ob3RlADEIAQYABwABAAAAAAAAAQmAAQAhAAAAM0IzMzU2M0NENUU5QTA0MEJC
MEE3NDI5MDIxMjA5MkUA+AYBIIADAA4AAADUBwQAGgANADcAHwABAF0BAQWAAwAOAAAA1AcEABoA
DQA3ADQAAQByAQEEgAEAHwAAAFJFOiBbQ21ha2VdIEZvcmNlIGEgZ2VuZXJhdG9yPwBACgENgAQA
AgAAAAIAAgABA5AGALQMAAAtAAAAAgExAAEAAABGAAAAAAAAAEhPmBNybNQRrAwAkCdAttoHAAW3
ClACWdMRq+8AkCdAttoAAAR+m/kAAHEHjkHd4+VBsCSDLzS8PQ0AAAAAfuYAAAAAQAA5AM78oXrI
K8QBHgAxQAEAAAALAAAATUNPR09TQ0hVTQAAAwAaQAAAAAAeADBAAQAAAAsAAABNQ09HT1NDSFVN
AAADABlAAAAAAAIBcQABAAAAFgAAAAHEK8F75sd1yaabiUgHqj5TPyg/WiAAAAIBCRABAAAAswcA
AK8HAAA8DAAATFpGdX5iUZEDAAoAcmNwZzEyNWIyA0N0ZXgFQQECMf8B9wqAAqQD5AcTAoAP8wBQ
fwRWCFUHshElDlEDAQIAY8JoCsBzZXQyBgAGw+0RJTMERhO3MBIsETMI720J9zsYHw4wNREiDGBj
5wBQCwkBZDM2FlARcwvxUCAjIEYDYToQwG48ZHkSIAmAAxADAGsgxlsAwAMQdG86AHAdk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