On 08/30/2016 03:58 AM, Yves Frederix wrote:
> Some time ago, I contributed generator expressions to
> install(DIRECTORY). It turns out, however, that the patch was
> incomplete and that there are problems in case the provided directory
> starts with a generator expression and evaluates to a full path. In
> attachment you can find a fix for the problem.
Thanks.
> - if (!cmSystemTools::FileIsFullPath(dir.c_str())) {
> + std::string::size_type gpos = cmGeneratorExpression::Find(dir);
> + if (gpos != 0 && !cmSystemTools::FileIsFullPath(dir.c_str())) {
Good. This check is used in several similar locations.
> + if (!cmSystemTools::FileIsFullPath(i->c_str())) {
> + *i = std::string(makefile.GetCurrentSourceDirectory()) + "/" + *i;
Perhaps we should issue a diagnostic here. In principle the caller
should always provide a full path. If they use a genex to do it then
they are on their own.
Thanks,
-Brad
--
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