I'm using a custom target to run an external command to build some
objects, however the external command needs some environment variables
setting to run properly.  Is there a way of setting an environment
variable within CMAKE, so that it gets used during the build?

It doesn't appear that,

        SET(ENV{MYVAR} FOO)
       ADD_CUSTOM_TARGET(MYTARGET mycommand args),

does the right thing, as the environment var MYVAR is only set during
the cmake build, but not populated at build time and so not utilised by
the custom target.

Joe
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to