glbinding icon indicating copy to clipboard operation
glbinding copied to clipboard

CMake git revision checks causes project regeneration

Open mattparks opened this issue 5 years ago • 1 comments

I have glbinding added to a project using FetchContent_Declare in CMake, I've noticed that every time I make a commit I will get a message like this in Visual Studio, and require a rebuild:

1>CMake is re-running because C:/Users/albrem/Documents/Workspace/Project/build/x86-Debug/_deps/glbinding-build/CMakeFiles/generate.stamp is out-of-date.
1>  the file 'C:/Users/albrem/Documents/Workspace/Project/.git/refs/heads/master'
1>  is newer than 'C:/Users/albrem/Documents/Workspace/Project/build/x86-Debug/_deps/glbinding-build/CMakeFiles/generate.stamp.depend'

I am using glbinding in a very large project, right now after any commit or branch change my entire project requires a rebuild.

mattparks avatar Oct 02 '19 15:10 mattparks

I added a patch to the current master branch which will allow to skip the git revision parsing. This is done if either (1) the glbinding CMake project detects it is not the root of the CMake project build, or (2) if the CMake option OPTION_USE_GIT_INFORMATION is set to Off.

Let me know if this helps.

scheibel avatar Jan 11 '22 07:01 scheibel