cginternals / cginternals/glbinding
Bloated build directory with CMake on macOS
- Dominant language
- C++
- Stars
- 877
- Forks
- 95
- PR merge metrics
- No merged PRs in 30d
Description
In my CMake project I download and build glbinding as a dependency with FetchContent:
```CMake
include(FetchContent)
FetchContent_Declare(
glbinding
#GIT_REPOSITORY https://github.com/cginternals/glbinding.git
GIT_TAG v3.3.0
URL https://github.com/cginternals/glbinding/archive/v3.3.0.tar.gz
EXCLUDE_FROM_ALL
)
set(OPTION_BUILD_TOOLS OFF CACHE BOOL "" FORCE)
set(OPTION_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
```
This works but generates a huge build folder `build/_deps/glbinding-build` (160-200 MB in Debug mode 45 MB in Release mode)
This massive amount of data sits inside `build/_deps/glbinding-build/source/glbinding/CMakeFiles/glbinding.dir/source` and `build/_deps/glbinding-build/source/glbinding-aux/CMakeFiles/glbinding-aux.dir/source` in form of really big .o and .o.d files:
Can I do anything to reduce the build size as permanently setting Release mode is not a real option?
I also tried setting
```CMake
set(BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE)
```
and
```CMake
set(OPTION_BUILD_WITH_LTO ON CACHE BOOL "" FORCE)
```
but these options had no significant effect.
My compiler is `Clang 15.0.0 arm64-apple-darwin23.5.0`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.