Brad, do you think rule env variables would be a good enhancement for CMake? This actually follows existing approach: configure everything once, save into cache, build with single invocation of build tool. The difference is only in details whether to pass options as arguments or as environment variables. But for the end user both should be able to be saved in cache, because regardless whether that was env variable or CMake variable they have same meaning: it is a configure time option. Requiring user to set same env variables at build is error prone, because it is something that can be automated.
P.S. My personal thumb rule is "what can be automated should be automated". On Tue, Jan 20, 2015 at 12:51 PM, Brad King <brad.k...@kitware.com> wrote: > On 01/20/2015 12:26 PM, Daniel Levin wrote: > > As far as I understand this 'env' is not a standard key in Ninja, right? > > That would be actually great to let CMake define environment variables > in rules. > > Does CMake support that already? > > What about Makefile compatibility, is it possible to define env > variables per rule in Makefiles? > > There is no model for specifying environment variables as part of build > rules. We expect that environment variables required by the toolchain > in use are already loaded. > > -Brad > >
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers