[cmake-developers] Minor regression in --version results for CMake 2.8.12.1 (A FALSE ALARM)

Jean-Christophe Fillion-Robin jchris.fillionr at kitware.com
Fri Dec 6 03:38:29 EST 2013


Hi Marcel,

You could use the "-p" option.

For example:

$ type -p ld
/usr/bin/ld

Hth
Jc


On Fri, Dec 6, 2013 at 3:28 AM, Marcel Loose <loose at astron.nl> wrote:

> On 05/12/13 18:27, Matthew Woehlke wrote:
> > On 2013-12-05 02:36, Alan W. Irwin wrote:
> >> Sorry, this turned out to be a false alarm. Despite "which cmake"
> >> telling me I was using cmake-2.8.12.1 [snip]
> >
> > ...which is, of course, why you should always use "type" in bash
> > rather than "which" :-). "type", being a shell built-in, will tell you
> > what bash will *actually* run, hashing - and shell builtins, and
> > functions, and aliases - included.
> >
> Hmm, interesting. I didn't know the "type" command. However, is there a
> way to easily parse the output of "type"? The "which" command simply
> returns the command it will execute or an empty string if there's no
> match. With "type", I've seen different outputs, like:
>
> $ type ls
> ls is aliased to `ls --color=auto'
>
> $ type rm
> rm is hashed (/bin/rm)
>
> $ type ld
> ld is /usr/bin/ld
>
> This make it pretty hard to parse :(
>
> Best regards,
> Marcel Loose.
>
>
> --
>
> 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
>



-- 
+1 919 869 8849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20131206/46508853/attachment.html>


More information about the cmake-developers mailing list