Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bloated build directory with CMake on macOS #351

Open
julcst opened this issue Jun 26, 2024 · 0 comments
Open

Bloated build directory with CMake on macOS #351

julcst opened this issue Jun 26, 2024 · 0 comments

Comments

@julcst
Copy link

julcst commented Jun 26, 2024

In my CMake project I download and build glbinding as a dependency with FetchContent:

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:
glbinding-debug-mode
Can I do anything to reduce the build size as permanently setting Release mode is not a real option?

I also tried setting

set(BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE)

and

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant