Re: [CMake] Export environment variables in generated Makefile

2015-05-18 Thread Taylor Braun-Jones
On Mon, May 18, 2015 at 8:48 AM, Brad King wrote: > 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 ctes

Re: [CMake] Export environment variables in generated Makefile

2015-05-18 Thread Brad King
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 environ

Re: [CMake] Export environment variables in generated Makefile

2015-05-16 Thread Taylor Braun-Jones
On May 16, 2015 12:18 PM, "Dan Kegel" wrote: > Write a wrapper script that sets the variables and invokes the compiler, > and tell cmake that's your compiler. > Ya, I thought about this but aside from having an interceptor for an interceptor there are also other complexities like: (1) One of th

Re: [CMake] Export environment variables in generated Makefile

2015-05-16 Thread Dan Kegel
Write a wrapper script that sets the variables and invokes the compiler, and tell cmake that's your compiler. -- 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 communi

Re: [CMake] Export environment variables in generated Makefile

2015-05-16 Thread Taylor Braun-Jones
Here's a little more context to help understand the use case: I'm using the BullseyeCoverage as a compiler interceptor. So I have CMAKE_CXX_COMPILER=/opt/bullseye/bin/g++ Which is symlink that looks like this: /opt └── bullseye └── bin ├── covc └── g++ -> covc covc is the B

[CMake] Export environment variables in generated Makefile

2015-05-15 Thread Taylor Braun-Jones
Is it possible for CMake to generate a Makefile that exports environment variables whenever a target is executed? I want all invocations of gcc to see the environment variables COVFILE=xxx and COVSRCDIR=xxx Thanks, Taylor -- Powered by www.kitware.com Please keep messages on-topic and check the