Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,823
    • Issues 3,823
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #19474
Closed
Open
Created Jul 14, 2019 by Marc Herbert@marc.herbert

Support _incremental_ CMAKE_AR_FLAGS / CMAKE_RANLIB_FLAGS

There doesn't to be any way to "tune" the existing CMAKE_${lang}_CREATE_STATIC_LIBRARY commands that generate libfoo.a files. The only to add a new flag like for instance "-D" seems to be:

  • reverse engineer what flags and/or commands CMake uses by default
  • redefine the entire CMAKE_${lang}_CREATE_STATIC_LIBRARY command or the CMAKE_C_ARCHIVE_CREATE one or CMAKE_C_ARCHIVE_FINISH - not even clear which one is/are best.
  • Pray a future CMake version doesn't break it

Example: https://github.com/zephyrproject-rtos/zephyr/pull/17495/files

foreach(lang ASM C CXX)
  # GNU ar always updates the index: no need for CMAKE_RANLIB
  SET(CMAKE_${lang}_CREATE_STATIC_LIBRARY
      "<CMAKE_AR> qcD <TARGET> <LINK_FLAGS> <OBJECTS>")
endforeach()

https://stackoverflow.com/questions/5659225/how-do-i-set-the-options-for-cmake-ar/5663246

https://cmake.org/pipermail/cmake/2019-February/069087.html Etc.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking