Classification:  UNCLASSIFIED 
Caveats: NONE
 
Fellow Cmake Users-
I am trying to set environment variables (namely PATH and PYTHONPATH) on
Windows during test execution. I utilize a configuration script which gets
converted from a .cmake.in to .cmake, then is used to call each of my tests.
The top of my .cmake.in looks as follows:

SET(TESTARG /path/to/whatever)
MESSAGE("TESTARG" ${TESTARG})
SET(ENV{PYTHONPATH} $ENV{PYTHONPATH}: TESTARG)
MESSAGE("PYTHONPATH:" $ENV{PYTHONPATH})

On Linux, this works perfectly. On Windows, however, there is no apparent
change to the environment variables (NOTE: I do change the ':' on Linux to
';' for Windows). It will output:

Linux:
TESTARG /path/to/whatever
PYTHONPATH: /whatever/my/python/path/was:/path/to/whatever

Windows:
TESTARG
PYTHONPATH: /whatever/my/python/path/was


It IS at least parsing through the commands, because if I put in a totally
invalid value to the SET command it will fail. It simply does not set either
the TESTARG (Cmake env. Variable) or PYTHONPATH (system env. Variable).
Has anyone had any luck setting environment variables on Windows?

Thanks for the assistance.


Emerson Sklar
Computer Scientist, High Performance Technologies, Inc.
<http://www.hpti.com/> 

Army Research Lab
Building 394 Room 202E
APG, Maryland 21005

Office: (410) 278-9151
Cell: (304) 203-8872

 
Classification:  UNCLASSIFIED 
Caveats: NONE

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
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