On Fri, Mar 6, 2009 at 9:35 AM, ankit jain <ankitgu...@gmail.com> wrote:
> > > 2009/2/17 Philip Lowman <phi...@yhbt.com> > >> On Mon, Feb 16, 2009 at 11:03 PM, ankit jain <ankitgu...@gmail.com>wrote: >> >>> Iam using cmake 2.6 >>> >> >> This should work on the latest CMake 2.6.3 RC, provided you use "make >> test". >> >> set_tests_properties(foo PROPERTIES ENVIRONMENT foo=bar) >> >> I have run this but not able to set the environment variable. > > I am using cmake-2.6.3-RC-14-Linux-i386. > Actually i have a test t1. i want to set and unset LD_LIBRARY_PATH > acc. while adding test t1 so that on running ctest it will use that value > of LD_LIBRARY_PATH rather than using the older set value. > > This iam not able to achieve that. > > Guide where iam wrong and what need to be done. > I was mistaken about the feature existing in CMake 2.6.3. Bill corrected me later in the thread. You will need to use CMake CVS to take advantage of the ENVIRONMENT test property. It is quite easy to build CMake CVS, just like any other CMake project. I hope it's acceptable for you. The only workaround I can think of is to set LD_LIBRARY_PATH manually before your special test. If it were called my_special_test you might run the following commands, for example: ctest --exclude-regex my_special_test export LD_LIBRARY_PATH=/my/new/path ctest --tests-regex my_special_test Also, I assume you're familiar with how CMake uses RPATH so you don't usually need to set LD_LIBRARY_PATH in your build tree...? -- Philip Lowman
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake