Skip to content

CMakeLists.txt: purpose of the CPACK_STRIP_FILES #433

Closed

Description

@yurtpage

The CMakeLists.txt contains the line:

set(CPACK_STRIP_FILES "${CMAKE_INSTALL_LIBDIR}/libadldap.so;${CMAKE_INSTALL_BINDIR}/admc")

From the description of the option https://cmake.org/cmake/help/latest/module/CPack.html#variable:CPACK_STRIP_FILES
it looks like it removes debug symbols from the so and executable.
In the description it's said that the option now can be just a boolean TRUE.
But do we really need the option at all?

Activity

  1. artyom-poptsov commented on Jun 23, 2026

    @artyom-poptsov
    Collaborator

    Hello @yurtpage !

    Why not? It is a common practice to strip extra information from binary files during installation, to make them smaller. Smaller binaries make for less memory footprint both in the storage in RAM.

    In some distributions you can install debug information as separate packages. ALT Linux distribution is one of such distributions:
    https://www.altlinux.org/Debuginfo

  2. yurtpage commented on Jun 23, 2026

    @yurtpage
    ContributorAuthor

    Then it can be changed to TRUE for simplicity.
    I don't remember if I had some warnings on this or any problems. But usually packages don't use the variable because the package builder strips everything itself
    https://chatgpt.com/s/t_6a3aa7514cfc81918c662a43e0e8bb37

  3. artyom-poptsov commented on Jun 24, 2026

    @artyom-poptsov
    Collaborator

    Hello @yurtpage !

    Good point, I checked the CMake/CPack documentation and indeed since CMake version 2.6 we can set CPACK_STRIP_FILES to TRUE:
    https://cmake.org/cmake/help/latest/module/CPack.html

    Since the minimum required version of CMake for ADMC is 3.16, we can safely replace the list of files with TRUE in the setting of CPACK_STRIP_FILES variable.

  4. artyom-poptsov commented on Jun 24, 2026

    @artyom-poptsov
    Collaborator

    I've made a PR that fixes this: https://altlinux.space/alt-domain/admc/pulls/8

  5. yurtpage commented on Jun 24, 2026

    @yurtpage
    ContributorAuthor

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions