[cmake-developers] Silencing warning about environment when using NMake / JOM

Brad King brad.king at kitware.com
Wed Aug 5 13:14:57 EDT 2015


On 08/05/2015 11:17 AM, James Johnston wrote:
>   To use the [NMake | JOM] generator, cmake must be run from a shell that
> can use the
>   compiler cl from the command line.  This environment does not contain
>   INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
>   work.
> 
> OK, so this is kind of a minor complaint, but this is an annoying warning if
> you aren't actually wanting Visual C++ in your environment.
[snip]
> Can these warnings be either eliminated entirely or suppressed via a more
> documented method?

IIRC the warning is there to help new users, especially in cmake-gui,
understand why the generator they selected does not work.  It could
be refactored to appear only if enabling the C or CXX compiler fails.
That way if you use the generator with no toolchain or with another
toolchain that does not need those environment variables it will just
work without a warning.

Thanks,
-Brad



More information about the cmake-developers mailing list