[cmake-developers] Setting up environment using ExternalProject_Add
Brad King
brad.king at kitware.com
Thu Aug 13 09:12:16 EDT 2015
On 08/12/2015 08:06 PM, James Johnston wrote:
>> http://www.cmake.org/Bug/view.php?id=15653
> I'll explore that option some more, after the feature you linked to is
> addressed.
Currently no one is looking at addressing it. If you want to work on
it, take a look at the PERMISSIONS option of the install() command:
http://www.cmake.org/cmake/help/v3.3/command/install.html
There has also been discussion before about permissions options that
respect umask:
http://www.cmake.org/Bug/view.php?id=10126#c19488
http://www.cmake.org/Bug/view.php?id=15163
> 1. The new <step>_ENVIRONMENT setting points to a "environment-set" script
> that does not try to do any launching (e.g. you could pass VCVarsAll.bat
> directly as the <step>_ENVIRONMENT). ExternalProject determines which shell
> to generate for, and generates the "environment-set-and-launch script"
> itself from scratch (like how I originally proposed with the "cmake -E"
> enhancement).
>
> In other words, ExternalProject(<snip> CONFIGURE_ENVIRONMENT
> $ENV{VS100COMNTOOLS}/../../VC/vcvarsall.bat x86 CMAKE_GENERATOR Ninja
> CMAKE_CACHE_ARGS <snip>) and away the user goes..
I think that is the simplest approach. It should be easier to use
and also allows us to change how it works underneath in the future if
needed because CMake retains control of the final script generation.
Thanks,
-Brad
More information about the cmake-developers
mailing list