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

Opt out install set #736

Open
SchrodingerZhu opened this issue Jan 26, 2025 · 4 comments
Open

Opt out install set #736

SchrodingerZhu opened this issue Jan 26, 2025 · 4 comments

Comments

@SchrodingerZhu
Copy link
Collaborator

When using snmalloc as a header-only library, one may not want the default installation targets. We should provide a way to opt out the installation.

@mjp41
Copy link
Member

mjp41 commented Jan 27, 2025

Do you have in mind what would be the right approach

  • A new flag to remove install targets.
  • Some other CMake magic I don't understand ;)

@nickdesaulniers
Copy link

Would it be possible to have two distinct targets? A build target which is distinct from an install target (which depends on the build target)? That way, users who want to build, but not install can be more specific.

@mjp41
Copy link
Member

mjp41 commented Jan 29, 2025

@nickdesaulniers I am not sure I follow

The main target for snmalloc is snmalloc, which is just the settings to build it in a header only way:

add_library(snmalloc INTERFACE)

I would have thought you could just consume this build target, and as long as you EXCLUDE_FROM_ALL on the add_subdirectory cmake call, then the install targets wouldn't be added to the parent project.

@SchrodingerZhu can you confirm the install trick is actually required in the libc work?

@SchrodingerZhu
Copy link
Collaborator Author

I remember the problem was that LLVM was doing sth with export sets and that messed up with snmalloc even when EXCLUDE_FROM_ALL is used.

I will be retrying it to get the error log.

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

3 participants