[CMake] add_test : expand environment variable at running time
Tyler Roscoe
tyler at cryptio.net
Mon Sep 13 12:12:54 EDT 2010
On Mon, Sep 13, 2010 at 06:01:52PM +0200, Olivier Pierard wrote:
> - add_test( mpirun -machinefile $TMPDIR myexec ) => will never expand
> TMPDIR - I don't understand why because in CTestTestfile.cmake, I have
> add_test( test_name "mpirun" "-machinefile" "$TMPDIR" "myexec"); if I
> submit this as a bash command, environment variable is well expanded;
> Does ctest prevent expanding variables at running time ?
>
> - add_test( mpirun -machinefile ${TMPDIR} myexec ) => expands at
> configuration time with cmake (empty because not defined in cmake - logical)
>
> - add_test( mpirun -machinefile $ENV{TMPDIR} myexec ) => expands at
> configuration time with cmake but TMPDIR is not yet defined on the
> master node (logical)
How about add_test (... \$TMPDIR ... )
?
tyler
More information about the CMake
mailing list