How to disable building glbinding::glbinding-aux?
In my root CMakeLists.txt I:
# glbinding
set(OPTION_BUILD_TOOLS OFF CACHE BOOL "" FORCE)
set(OPTION_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory(external/glbinding/)
And then I only link:
target_link_libraries(${PROJECT_NAME} PRIVATE
glbinding::glbinding
glfw
)
(note the missing glbinding::glbinding-aux linking)
But it seems like I'm missing an option or something and the glbinding-aux lib still gets built anyway just from adding this repo as a subdirectory:
...
[ 87%] Building CXX object external/glbinding/source/glbinding-aux/CMakeFiles/glbinding-aux.dir/source/Meta_FunctionStringsByExtension.cpp.obj
[ 88%] Building CXX object external/glbinding/source/glbinding-aux/CMakeFiles/glbinding-aux.dir/source/Meta_FunctionStringsByVersion.cpp.obj
[ 89%] Building CXX object external/glbinding/source/glbinding-aux/CMakeFiles/glbinding-aux.dir/source/Meta_ReqVersionsByExtension.cpp.obj
[ 90%] Building CXX object external/glbinding/source/glbinding-aux/CMakeFiles/glbinding-aux.dir/source/Meta_StringsByBitfield.cpp.obj
[ 91%] Building CXX object external/glbinding/source/glbinding-aux/CMakeFiles/glbinding-aux.dir/source/Meta_StringsByBoolean.cpp.obj
[ 92%] Building CXX object external/glbinding/source/glbinding-aux/CMakeFiles/glbinding-aux.dir/source/Meta_StringsByEnum.cpp.obj
[ 93%] Building CXX object external/glbinding/source/glbinding-aux/CMakeFiles/glbinding-aux.dir/source/Meta_StringsByExtension.cpp.obj
[ 93%] Building CXX object external/glbinding/source/glbinding-aux/CMakeFiles/glbinding-aux.dir/source/ValidVersions_list.cpp.obj
[ 94%] Building CXX object external/glbinding/source/glbinding-aux/CMakeFiles/glbinding-aux.dir/source/debug.cpp.obj
...
and it takes soooooo long to build. I'd prefer not to.
Is there just an option similar to OPTION_BUILD_TOOLS / OPTION_BUILD_EXAMPLES to disable building it? Could it be added? Thanks.
mingw32 / mingw64 cmake can also just straight up run out of memory when building it, I had to switch to ucrt64:
cc1plus.exe: out of memory allocating 528383 bytes
mingw32-make[2]: *** [external\glbinding\source\glbinding-aux\CMakeFiles\glbinding-aux.dir\build.make:274: external/glbinding/source/glbinding-aux/CMakeFiles/glbinding-aux.dir/source/Meta_StringsByEnum.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:541: external/glbinding/source/glbinding-aux/CMakeFiles/glbinding-aux.dir/all] Error 2
mingw32-make: *** [Makefile:145: all] Error 2
glbinding already takes a long time to build and I timed how much glbinding-aux adds on my PC - it's like an extra 4 minutes.
Thanks for reporting your use case.
As we have options to disable other optional targets within the glbinding project, it comes natural to have one for glbinding-aux, too. I can add such an option.
In the meantime, it might be worth selecting only the glbinding target when building the project:
> cmake --build build --target glbinding
(or the corresponding build-tool-specific variant). This approach wouldn't help with the install target, though...
Thank you!😄 I really need to get a new computer.😵💫
It's so useful for learning and figuring things out to have a minimal version that takes less time to build when I'm messing with my CMake build scripts and have to constantly keep rebuilding, which can take a lot of time on old HW.🙂