Hi,

  I am seeking for advise. I would like to run some CTest tests from the build 
tree, which require C++ or Python modules created in other project directories 
(packages). For this I need to build correctly the LD_LIBRARY_PATH and 
PYTHONPATH and use the command set_property(TEST xxx PROPERTY ENVIRONMENT 
LD_LIBRARY_PATH=yyy PYTHONPATH=xxx). The question is how to make this the most 
easy and transparent way as possible, since the modules I would need in the 
tests are not easily known a priori.

   If I could set a global variable in each package that creates a module, 
something like <PACKAGE>_MODULE_DIRS and I could collect these in the package 
that I want to run the test and build the ENVIRONMENT property accordingly. The 
problem is that it is not so easy in CMake to set global variables. 

  Another alternative would be to define  a function called  
module_directories(), which behaves like the command  link_dicrectories(), that 
I could call every time I create/define a module. I would then recover the list 
of directories using a specific directory property,  as it is done in the case 
of LINK_DIRECTORIES.

  Does anybody has a similar problem and has found an elegant solution? Many 
thanks  in advance.


-------------------------------------------------------------
Pere Mato  CERN, PH Department, CH 1211 Geneva 23, Switzerland
          e-mail: pere.m...@cern.ch      tel: +41 22 76 78696
          fax:  +41 22 76 68792            gsm: +41 76 48 70855


_______________________________________________
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

Reply via email to