norlab-ulaval / libnabo

A fast K Nearest Neighbor library for low-dimensional spaces
http://norlab-ulaval.github.io/libnabo/
BSD 3-Clause "New" or "Revised" License
431 stars 142 forks source link

Remove dependency on grep in README + Improve findstr command #121

Closed maximecharriere closed 2 years ago

maximecharriere commented 2 years ago

Hello, it's me again. First of all, I have removed the dependency on grep in the README.

I have also slightly improved yesterday's PR #120.
The current solution with findstr is fully functional, but it has a little difference with the solution using grep. Due to a strange behaviour of execute_process(COMMAND ...) on Windows, the following two lines are returned by findstr, whereas only the first one is returned if the command is run directly in the shell.

#define NABO_VERSION "1.0.7"
#define NABO_VERSION_INT 10007

However, this did not cause any problem as string(REGEX REPLACE ...) still managed to find the correct version.

I asked the question on Stackoverflow (link), and the solution off this PR was found.

ethzasl-jenkins commented 2 years ago

Can one of the admins verify this patch?

pomerlef commented 2 years ago

ok to test

pomerlef commented 2 years ago

I'm a bit blind on the support for Windows as it's not included in our CI, as long as it doesn't break the other system support, and it looks raisonnable, I'll let you investigate.