[CMake] Set a variable?

2009-09-22 Thread motes motes
In a CMakeList.txt file I have: SET(ELASTIX_BUILD E:/local/lib/elastix_sources_v4.1/src/build) ... LINK_DIRECTORIES(${ELASTIX_BUILD}/Components/Optimizers/StandardGradientDescent) I would to be able to specify the variable: ELASTIX_BUILD when I read the CMakeList.txt file and then choose it

Re: [CMake] Set a variable?

2009-09-22 Thread James C. Sutherland
On Sep 22, 2009, at 6:16 AM, motes motes wrote: In a CMakeList.txt file I have: SET(ELASTIX_BUILD E:/local/lib/elastix_sources_v4.1/src/build) ... LINK_DIRECTORIES(${ELASTIX_BUILD}/Components/Optimizers/ StandardGradientDescent) I would to be able to specify the variable: ELASTIX_BUILD

Re: [CMake] Set a variable?

2009-09-22 Thread motes motes
On Tue, Sep 22, 2009 at 3:55 PM, James C. Sutherland james.sutherl...@utah.edu wrote: On Sep 22, 2009, at 6:16 AM, motes motes wrote: In a CMakeList.txt file I have: SET(ELASTIX_BUILD E:/local/lib/elastix_sources_v4.1/src/build) ...

[CMake] set environment variable scope

2008-03-28 Thread Kaleb Pederson
What's the best way to set an environment variable that will be active for a custom target or command? For example: SET(ENV{TESTING} MyValueHere) MESSAGE(STATUS Set value to: $ENV{TESTING}) ADD_CUSTOM_TARGET( target COMMAND cmdThatRequiresTestingEnvVar VERBATIM )

Re: [CMake] set environment variable scope

2008-03-28 Thread Bill Hoffman
Kaleb Pederson wrote: What's the best way to set an environment variable that will be active for a custom target or command? For example: SET(ENV{TESTING} MyValueHere) MESSAGE(STATUS Set value to: $ENV{TESTING}) ADD_CUSTOM_TARGET( target COMMAND cmdThatRequiresTestingEnvVar

Re: [CMake] set environment variable scope

2008-03-28 Thread Kaleb Pederson
On Friday 28 March 2008, Bill Hoffman wrote: Kaleb Pederson wrote: What's the best way to set an environment variable that will be active for a custom target or command? [snip] There is currently not a direct way to do this. You would have to create a cmake -P script and call the set(ENV

[CMake] set environment variable

2007-10-30 Thread Mark Wyszomierski
Hi, Is it possible to set an environment variable (linux) through CMake? Thanks, Mark ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] set environment variable

2007-10-30 Thread David Cole
Yes... SET(ENV{BLAH} blah value) ...but it only applies to the running process. The parent process environment remains unaffected by this type of SET. Then, to read env vars into cmake, use $ENV{BLAH} On 10/30/07, Mark Wyszomierski [EMAIL PROTECTED] wrote: Hi, Is it possible to set an

Re: [CMake] set environment variable

2007-10-30 Thread Mark Wyszomierski
Hi David, I'm new to linux, do you mean that setting the env var like that through CMake will only affect my executables during run time- in other words the env var is only set for my exes? That's fine and what I need - Mark On 10/30/07, David Cole [EMAIL PROTECTED] wrote: Yes...

Re: [CMake] set environment variable

2007-10-30 Thread David Cole
Yes, that's exactly what I mean... :-) On 10/30/07, Mark Wyszomierski [EMAIL PROTECTED] wrote: Hi David, I'm new to linux, do you mean that setting the env var like that through CMake will only affect my executables during run time- in other words the env var is only set for my exes?

Re: [CMake] set environment variable

2007-10-30 Thread Bill Hoffman
Mark Wyszomierski wrote: Hi David, I'm new to linux, do you mean that setting the env var like that through CMake will only affect my executables during run time- in other words the env var is only set for my exes? That's fine and what I need - They will only be set during cmake time. Cmake

Re: [CMake] set environment variable

2007-10-30 Thread David Cole
Oops. I misread your reply (too fast)... Bill is right. To set an env var for your executables, you'll need to write code that does it yourself. On 10/30/07, Bill Hoffman [EMAIL PROTECTED] wrote: Mark Wyszomierski wrote: Hi David, I'm new to linux, do you mean that setting the env var