Skip to content

CI: remove unused library - #207

Closed
casperdcl wants to merge 1 commit into
mainfrom
test-unused-lib
Closed

CI: remove unused library#207
casperdcl wants to merge 1 commit into
mainfrom
test-unused-lib

Conversation

@casperdcl

@casperdcl casperdcl commented Aug 19, 2026

Copy link
Copy Markdown
Member

As per #199 (comment) it seems the static lib is a CMake build hack which isn't actually necessary nor desired for distribution in a header-only package.

This PR:

  • reduces package size from 17MB to 0.5MB (tar.gz from 1.8MB to 0.066MB)
  • tests that cpp/examples still builds sans libpetsird.a

@casperdcl casperdcl added the enhancement New feature or request label Aug 19, 2026
@casperdcl casperdcl self-assigned this Aug 19, 2026
@KrisThielemans

Copy link
Copy Markdown
Contributor

This library is generated by

# petsird_generated is an OBJECT library. Those are a bit hard
# to handle for external projects, so create a "real" library as well.
# This is the one people should use.
add_library(petsird STATIC)
target_link_libraries(petsird PUBLIC petsird_generated)

It is referenced

(petsird2) kris@KrisXPS:~/miniforge3/envs/petsird/lib/cmake/PETSIRD-0.9$ grep -r libpets
PETSIRDTargets-debug.cmake:  IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/libpetsird.a"
PETSIRDTargets-debug.cmake:list(APPEND _cmake_import_check_files_for_PETSIRD::petsird "${_IMPORT_PREFIX}/lib/libpetsird.a" )

I've created #208. This works locally (let's see what CI says). It does fail when I remove libpetsird.a.

@KrisThielemans

Copy link
Copy Markdown
Contributor

If you can change the CMakeLists.txt to avoid creating the .a (I couldn't), feel free, but I have no headspace for this anymore and won't be able to review. I strongly suggest to close and got onto more urgent stuff.

@casperdcl casperdcl closed this Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants