Skip to content

Add keyword INTERFACE to fix build error 'ar: no archive members specified' on macOS #93

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

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

light-tech
Copy link
Contributor

On macOS, CMake (3.23) could not build the generated target: It cannot produce the static library with the error

ar: no archive members specified

because there is no object file supplied (the generated target is header-only). Simply adding the keyword INTERFACE disables building the static library.

…ified' since the generated target is header-only
@tylerjw
Copy link
Contributor

tylerjw commented Nov 17, 2022

I'm not sure why I did not do it this way in the first place. Approving so it'll run CI.

@light-tech
Copy link
Contributor Author

I'm not sure why I did not do it this way in the first place. Approving so it'll run CI.

I believe some ar implementation allows for an empty list of object files, in which case, it simply produces an empty .a file (reportedly just 8 bytes in size).

@tylerjw tylerjw merged commit ba27364 into PickNikRobotics:main Nov 21, 2022
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

Successfully merging this pull request may close these issues.

2 participants