[cmake-developers] KWSys patches
Brad King
brad.king at kitware.com
Mon Feb 16 14:57:13 EST 2015
On 02/16/2015 02:47 PM, Domen Vrankar wrote:
> I've noticed that exceptions are not used but was not certain how else
> to handle this
FYI, the proposed GetCanonicalPath already exists in KWSys as
SystemTools::GetRealPath. It returns the unchanged path on error.
That could be extended to take an optional second argument as a
pointer to a buffer describing the error. If the argument is NULL
use the current behavior. Otherwise return an empty string and
populate the error info. Then make your new call sites use the
new argument.
> One more question... When I first started writing the patch I thought
> about printing out a warning if circular recursion is detected but was
> not certain if it would be OK to just write the output to std::cerr
> (or the kwsys wrapper equivalent) with canonical paths that caused it.
> Should I leave out such message or would it be better to add it and
> how?
Since KWSys is a library it shouldn't print anything on behalf of
the application. The Glob API could also take an optional pointer
to an error description buffer.
Thanks,
-Brad
More information about the cmake-developers
mailing list