[CMake] looking for Visual Studio installation

Andreas Pakulat apaku at gmx.de
Sun Apr 19 07:50:49 EDT 2009


On 19.04.09 13:31:22, Piotr Dobrogost wrote:
> Bill Hoffman wrote:
> 
> > That is by design.   Even if CMake did find them, the user would still
> > need to set them in order to use the command line tools.  CMake makes
> > the simple assumption that the compiler is installed and running in the
> > environment CMake is running in.
> 
> I get it. But wouldn't it be a GOOD THING to incorporate logic of
> vcvarsall.bat into cmake's module looking for VC?

That would mean it needs to find that file as first thing, because that
file actually uses its own absolute path to set the variables properly. And
at that moment you again have a problem when people have multiple VS
installations on the same machine.

> I would be surprised to see cmake supporting some tool chain out of the
> box but not supporting the most popular tool chain on Windows platform
> in the same way.

It does support _all_ toolchains in the same way, it expects the toolchain
to be available in the environment in which cmake is executed.

> Do you know any other platform where user has to manually set
> environment each time he's going to use development tools?

All platforms that cmake supports work the same way. On each platform cmake
expects you to setup your environment for the toolchain you want to use.
Sure its easier on linux because the default version of
compiler+linker+make are automatically available in your environment. As
soon as you want to use a different toolchain you have to go through the
same things as on windows. You can of course also have your development
tools in your default environment on windows as well and maybe MSVS should
offer to do that during installation.

Andreas

-- 
Don't feed the bats tonight.


More information about the CMake mailing list