Search code examples
gitversion-controlcmakeperforceflatbuffers

Projects generated by cmake have absolute path, causing difficulty in compilation across different machines


Flatbuffers source code synced from GitHub need to made using cmake. I see that the projects thus generated are tied to the machine, due to absolute paths embedded in project. Due to this behavior the project is build correctly on my machine, but if I sync the project on some other machine, compilation fails.

Does anyone have any insight on how we can manage flatbuffers project over source control (like Git/ Perforce). I just want to remove the dependency of using cmake on every machine by checking in the project.

Pleas help.


Solution

  • The way CMake works is that you should regenerate it on every machine. You should not add generated projects to source control.

    The absolute path is a CMake issue, not a FlatBuffers issue (you're using the wrong tag).