Skip to content

Conversation

Sokolmish
Copy link
Contributor

@Sokolmish Sokolmish commented Apr 20, 2024

Hello. I used nanoflann in my project and got a linker error because of pthreads usage (std::async). Since I don't use parallel construction and don't want to link my code with pthreads, I've just removed these calls from the library. I think that it might be convenient for others to do the same by just adding a define before including the header, so I made this PR.

I was thinking about adding the possibility to disable multi-threading to CMake, but I'm not an expert on it. If you think that it is necessary, I'll figure it out and add it to the PR.

Also, I've included in the readme all the ifdefs I found in the header.

@jlblancoc jlblancoc merged commit 3900193 into jlblancoc:master Apr 22, 2024
@jlblancoc
Copy link
Owner

LGTM, thanks! I think it's not worth changing cmake for this, since interested users may just define the preprocessor symbol from their side if needed.

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