[CMake] Export environment variables in generated Makefile

Brad King brad.king at kitware.com
Mon May 18 08:48:59 EDT 2015


On 05/17/2015 12:35 AM, Taylor Braun-Jones wrote:
> CMake already has an ENVIRONMENT property for tests ...
> symmetric feature would be to support an ENVIRONMENT property
> for targets as well.

We can provide it for tests because ctest directly runs the tests.
There is no way to implement environment settings consistently
across all generators when launching compiler tools.  The VS
and Xcode IDE project files provide no way to do it in general.
Our workflow for command-line builds has always been to have the
necessary environment variables defined by the caller and not
within the scope of CMake.

-Brad



More information about the CMake mailing list