> I'll get the KWSys patch through. Once it is integrated into > CMake then you can rebase the CMake part of the change on that. > > However, please revise the logic in the KWSys patch to avoid > using exceptions.
I've noticed that exceptions are not used but was not certain how else to handle this (and CMake at least printed out the error message before exiting - did not know that this is common code for different projects at the time). I have a few ideas but they all seem semi optimal to me so I'll need some guidance regarding this... One option would be to return empty string from Directory::GetCanonicalPath if an error occurs but currently when Glob::FindFiles returns false error checking in CMake code treats it as if no files were found so I don't think that returning false would be the way to go. Other option would be to call exit() inside the Directory::GetCanonicalPath function but I guess that this would be even worse than throwing an exception... Third option that came to mid was to return empty string Directory::GetCanonicalPath if an error occurs and simply ignore it in Glob class - since the error should occur only rarely/never and circular recursion is a corner case this is probably the best solution... 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? Thanks, Domen -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
