[CMake] How to set the cmake variable on windows

Brett Delle Grazie brett.dellegrazie at gmail.com
Mon Jan 14 13:42:07 UTC 2013


On 10 January 2013 22:28, Parchet Michaël <mparchet at sunrise.ch> wrote:

>
> Hello,
>
> How can I set minGW as default cmake compiler on windows ?
> Tanks for your answer.
>
> Regards
>
> mparchet
> Le 10 janv. 2013 à 22:47, Patrick von Reth <patrick.vonreth at gmail.com> a
> écrit :
>
> > Hi you have to use "cmake -G"MinGW Makefiles" ..."
> >
> > On 10/01/2013, Parchet Michaël <mparchet at sunrise.ch> wrote:
> >> My compilretr is minGW.
> >>
> >>
> >>
> >> De : Parchet Michaël [mailto:mparchet at sunrise.ch]
> >> Envoyé : jeudi 10 janvier 2013 21:36
> >> À : cmake at cmake.org; 'KDE on Windows'
> >> Objet : How to set the cmake variable on windows
> >>
> >>
> >>
> >> Hello,
> >>
> >>
> >>
> >> When I try to execute cmake on the terminal on windows, I get an error.
> >> (See
> >> attachment).
> >>
> >>
> >>
> >> It seems that some variables aren’t set.
> >>
>

Which generator are you using?
I use:
cmake -G"MinGW Makefiles" <path to source dir>

I believe the default generator on windows is Microsoft's' compilers, hence
the problem with CL.exe.

Assumptions:
This presumes standard MinGW32 compilers are available on the path - for me
this is C:\MinGW\bin
Do not put the MSYS shell (C:\MinGW\msys\1.0\bin) on the path as well or
CMake will complain.

You shouldn't need to set CXX or CC environment variables but you can do so
as a last resort.

Note that "make" in this case (windows command prompt) is usually:
mingw32-make, not gmake or make

Good luck,

Brett


> >>
> >>
> >> Are there environmental variables or variables set in a specific file.
> >>
> >>
> >>
> >> Thanks a lot your support
> >>
> >>
> >>
> >> Happy new year.
> >>
> >>
> >>
> >> Best regards
> >>
> >>
> >>
> >> mparchet
> > _______________________________________________
> > Kde-windows mailing list
> > Kde-windows at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-windows
> --
>
> 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://mail.kde.org/pipermail/kde-windows/attachments/20130114/ce8a2e09/attachment.html>


More information about the Kde-windows mailing list