Skip to content

Commit

Permalink
Fixed test case when CL is disabled. Improved verbose output of confi…
Browse files Browse the repository at this point in the history
…guration.
  • Loading branch information
stephanemagnenat committed Mar 27, 2011
1 parent 4a43d8e commit 6fa91a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Expand Up @@ -48,7 +48,10 @@ if (OPENCL_INCLUDE_DIR AND OPENCL_LIBRARIES)
add_definitions(-DHAVE_OPENCL)
set(EXTRA_LIBS ${OPENCL_LIBRARIES} ${EXTRA_LIBS})
include_directories(${OPENCL_INCLUDE_DIR})
add_definitions(-DOPENCL_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}/nabo/opencl/\")
add_definitions(-DOPENCL_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}/nabo/opencl/\")
message("OpenCL found, enabling CL support")
else (OPENCL_INCLUDE_DIR AND OPENCL_LIBRARIES)
message("OpenCL not found, disabling CL support")
endif (OPENCL_INCLUDE_DIR AND OPENCL_LIBRARIES)

# include all libs so far
Expand Down
2 changes: 2 additions & 0 deletions tests/CMakeLists.txt
Expand Up @@ -26,6 +26,7 @@ if (ANN_INCLUDE_DIR AND ANN_LIBRARY)
include_directories(${ANN_INCLUDE_DIR})
set(EXTRA_LIBS ${ANN_LIBRARY} ${EXTRA_LIBS})
add_definitions(-DHAVE_ANN)
message("ANN found, enabling it in benchmarks")
else (ANN_INCLUDE_DIR AND ANN_LIBRARY)
message("ANN not found, disabling it in benchmarks")
endif (ANN_INCLUDE_DIR AND ANN_LIBRARY)
Expand All @@ -44,6 +45,7 @@ if (FLANN_INCLUDE_DIR AND FLANN_LIBRARY)
include_directories(${FLANN_INCLUDE_DIR})
set(EXTRA_LIBS ${FLANN_LIBRARY} ${EXTRA_LIBS})
add_definitions(-DHAVE_FLANN)
message("FLANN found, enabling it in benchmarks")
else (FLANN_INCLUDE_DIR AND FLANN_LIBRARY)
message("FLANN not found, disabling it in benchmarks")
endif (FLANN_INCLUDE_DIR AND FLANN_LIBRARY)
Expand Down
2 changes: 1 addition & 1 deletion tests/knnvalidate.cpp
Expand Up @@ -62,7 +62,7 @@ void validate(const char *fileName, const int K, const int method)
NNSV nnss;
unsigned searchTypeCount(NNS::SEARCH_TYPE_COUNT);
#ifndef HAVE_OPENCL
searchTypeCount -= 2;
searchTypeCount -= 3;
#endif // HAVE_OPENCL
for (unsigned i = 0; i < searchTypeCount; ++i)
nnss.push_back(NNS::create(d, d.rows(), typename NNS::SearchType(i)));
Expand Down

0 comments on commit 6fa91a5

Please sign in to comment.