[CMake] how to get compile environment ($host) in cmake

Clark J. Wang dearvoid at gmail.com
Thu May 17 04:32:02 EDT 2007


On 5/17/07, haibin zhang <dragzhb at yahoo.com.cn> wrote:
>
> thanks
> but I see cmake-2.4.6 CMakeLists.txt file :
>
> IF(WIN32)
>   IF(NOT UNIX)
>     IF(NOT BORLAND)
>       IF(NOT MINGW )
>         SET(CMAKE_BUILD_ON_VISUAL_STUDIO 1)
>       ENDIF(NOT MINGW )
>     ENDIF(NOT BORLAND)
>   ENDIF(NOT UNIX)
> ENDIF(WIN32)
>
> who set this , WIN32 or UNIX or other ?


When running `cmake <path-to-source>' , there will be a file
`<path-to-source>/CMakeFiles/CMakeCCompiler.cmake' created.It'll set
variables like UNIX, CYGWIN or MINGW.

regards
>
>
> *"Clark J. Wang" <dearvoid at gmail.com>* 写道:
>
> On 5/17/07, haibin zhang <dragzhb at yahoo.com.cn> wrote:
> >
> > Hi all :
> >   how to get $host in cmake ?
> >
> > In autotool , it can use $host to get compile environment, example
> > cygwin,i686-pc-mingw32 .
>
>
> Use CMAKE_SYSTEM
>
> regards
> >
> >
> > ------------------------------
> > Mp3疯狂搜-新歌热歌高速下 <http://music.yahoo.com.cn/?source=mail_mailbox_footer>
> >
> > _______________________________________________
> > CMake mailing list
> > CMake at cmake.org
> > http://www.cmake.org/mailman/listinfo/cmake
> >
>
>
> ------------------------------
> 抢注雅虎免费邮箱3.5G容量,20M附件! <http://cn.mail.yahoo.com>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070517/ea416221/attachment.html


More information about the CMake mailing list