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
440 stars 144 forks source link

[test] include time.h for bsd build #7

Closed PierrickKoch closed 10 years ago

PierrickKoch commented 10 years ago

CLOCK_PROCESS_CPUTIME_ID is defined in <time.h>

Here is the error on NetBSD-6.1.2-x86_64:

In file included from /local/robotpkg/var/tmp/robotpkg/wip/libnabo/work/libnabo-1.0.4/tests/knnbucketsize.cpp:33:0:
/local/robotpkg/var/tmp/robotpkg/wip/libnabo/work/libnabo-1.0.4/tests/helpers.h: In member function 'boost::timer::Time boost::timer::curTime() const':
/local/robotpkg/var/tmp/robotpkg/wip/libnabo/work/libnabo-1.0.4/tests/helpers.h:158:18: error: 'CLOCK_PROCESS_CPUTIME_ID' was not declared in this scope
In file included from /local/robotpkg/var/tmp/robotpkg/wip/libnabo/work/libnabo-1.0.4/tests/knnbench.cpp:37:0:
/local/robotpkg/var/tmp/robotpkg/wip/libnabo/work/libnabo-1.0.4/tests/helpers.h: In member function 'boost::timer::Time boost::timer::curTime() const':
/local/robotpkg/var/tmp/robotpkg/wip/libnabo/work/libnabo-1.0.4/tests/helpers.h:158:18: error: 'CLOCK_PROCESS_CPUTIME_ID' was not declared in this scope
PierrickKoch commented 10 years ago

My mistake, I thought the build passed, but it still doesn't, it seems that CLOCK_PROCESS_CPUTIME_ID is not defined on NetBSD, but CLOCK_PROF is, I'll try to come back with a proper fix.

Sorry again for the mistake.