[CMake] Changing the default compiler of VC++

ankit jain ankitguddu at gmail.com
Mon May 4 08:26:14 EDT 2009


2009/5/4 Andreas Pakulat <apaku at gmx.de>

> On 04.05.09 17:28:48, ankit jain wrote:
> > Hi all,
> >
> > Actually I am porting my code on windows but since windows don't
> understand
> > the unix libraries iam using third party toolkit mks earlier to build the
> > code and linking all the headers and libraries of mksnt.
> >
> > but now i am not using mks and directly building the code using visual
> > studio .net 2003. since VC++ uses cl compiler by defualt i want to change
> it
> > through cmakelist variable CMAKE_C_COMPILER and CXX variable to the
> compiler
> > used by mks i.e cxx.
> >
> > But when iam doing so it is still using cl. I am not getting from where
> it
> > is taking cl complier and not changing to whatever i want.
> >
> > It might feel auckward to some of you that why iam changing to mks
> compiler
> > becuase  iwant to check my code whether without opening mks bash if iam
> > direclty using its compiler will it work or not..
> >
> > I request you all to tell me how it can de done so that my VC++ takes cxx
> > compiler of mks toolkit rather its default cl compiler...
>
> I think you can't or I'm misunderstanding what you really want to do. VC++
> _always_ uses cl as VC++ == cl+link basically. You might be able to get
> cmake to use the mks compiler by providing an environment in which cl is
> not available in PATH but the mks compiler.
>
> However its not quite clear wether you're already doing that (build your
> code with mks) and now want to build the same code with cl/VC++ or
> something else?
>

Thanks Andreas for your reply. I already build the code using mks. now i
want to build the code using cl/VC++. since it gives lots of errors of not
founding fiels like strings.h unistd.h so i thought its good to link it with
mks compiler and give path to the libraries and header used my mks for
windows.. i hope you got it..

Ankit

>
> Andreas
>
> --
> You love your home and want it to be beautiful.
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090504/e58e7de2/attachment.htm>


More information about the CMake mailing list