[CMake] execute_process command problem
wim van hoydonck
wim.van.hoydonck at gmail.com
Mon Sep 17 17:37:44 EDT 2007
Add an output_variable to the list of arguments of execute_process if
you do not want the output of make clean to be send to stdout:
execute_process(WORKING_DIRECTORY $ENV{PP_ROOTDIR}/src
COMMAND make clean
RESULT_VARIABLE ret_var
OUTPUT_VARIABLE output_var)
Greetings,
Wim
On 9/17/07, Ajay Divekar <aj.divekar at gmail.com> wrote:
> What that does is it outputs make clean command's output on standard
> output. On the other hand if I cd and then execute make clean command
> then it does not output anything to the standard output.
>
> Regards,
>
> Ajay Divekar
>
> On 9/17/07, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> > Ajay Divekar wrote:
> > > I have some problem executing the execute_process command of cmake on
> > > fedora 6 and 7 whereas the same command works fine in FreeBSD 6.2.
> > >
> > > The command that i have is as follows
> > >
> > > EXECUTE_PROCESS( COMMAND cd $ENV{PP_ROOTDIR}/src
> > > COMMAND make clean RESULT_VARIABLE ret_var)
> > >
> > > IF(NOT "${ret_var}" STREQUAL 0)
> > > MESSAGE(FATAL_ERROR "Unable to execute make clean command on the
> > > source dir. Error -> ${ret_var}")
> > > ENDIF(NOT "${ret_var}" STREQUAL 0)
> > >
> > > The error that is generated is as follows
> > >
> > > "Unable to execute make clean command on the source dir. Error -> No
> > > such file or directory."
> > >
> > > I have tried this over and over but this command never works on Fedora.
> > >
> > What about:
> > execute_process(WORKING_DIRECTORY $ENV{PP_ROOTDIR}/src
> > COMMAND make clean RESULT_VARIABLE ret_var)
> >
> > -Bill
> >
> >
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
--
Avoid hangovers - stay drunk!
More information about the CMake
mailing list