[cmake-developers] [PATCH] Fix error in compiling C++ files generating by protobuf compiler when .proto files are organized in a directory hierarchy

David Cole dlrdave at aol.com
Mon May 26 07:15:44 EDT 2014


> Hi everybody there,
>
> Subject says it all. See the attached patch please.
>
> (Didn't care enough to leave hg for git to generate the patch. Sorry.)


FILE_PATH is likely to contain "C:" or some other drive letter on
Windows. It is therefore unsuitable for using to construct a sub-path
underneath CMAKE_CURRENT_BINARY_DIR.

You don't have to care enough to leave hg, but we do have to care
enough to make sure CMake still works on all the platforms it's
intended to work on.

This patch may fix your particular use case, but it is not generally
correct, and therefore, unlikely to be adopted into upstream CMake.
There must be a better solution, that will work on all platforms...


David C.





More information about the cmake-developers mailing list