[CMake] find_program refuse find su and sudo
Michael Wild
themiwi at gmail.com
Sun Sep 12 08:47:22 EDT 2010
On 12. Sep, 2010, at 14:01 , Serghei Amelian wrote:
> Hello,
>
> I try to check where are located su and sudo and, guess what, cmake do not
> want to find it :) Maybe it's because sudo and su are suid-ed, but this is
> not documented.
>
> This is a little script and output:
>
> ##############
> cmake_minimum_required( VERSION 2.6 )
>
> project( test )
>
> find_program( VAR_LS ls )
> find_program( VAR_TAR tar )
> find_program( VAR_SU su )
> find_program( VAR_SUDO sudo )
>
> message( STATUS ${VAR_LS} )
> message( STATUS ${VAR_TAR} )
> message( STATUS ${VAR_SU} )
> message( STATUS ${VAR_SUDO} )
> ###############
>
> -- The C compiler identification is GNU
> -- The CXX compiler identification is GNU
> -- Check for working C compiler: /usr/bin/gcc
> -- Check for working C compiler: /usr/bin/gcc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- /bin/ls
> -- /bin/tar
> -- VAR_SU-NOTFOUND
> -- VAR_SUDO-NOTFOUND
> -- Configuring done
> -- Generating done
>
> Of course I have su and sudo installed:
>
> # which sudo su
> /usr/bin/sudo
> /bin/su
>
> Any clue?
>
> --
> Serghei
It's because they're only readable by root. See
http://www.vtk.org/Bug/view.php?id=10468
Michael
--
There is always a well-known solution to every human problem -- neat, plausible, and wrong.
H. L. Mencken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100912/6797d20f/attachment.pgp>
More information about the CMake
mailing list