1 |
jlec 13/12/07 19:10:22 |
2 |
|
3 |
Added: flann-1.8.4-multilib.patch |
4 |
flann-1.8.4-options.patch flann-1.8.4-docdir.patch |
5 |
flann-1.8.4-cuda5.5.patch |
6 |
flann-1.8.4-examples.patch |
7 |
flann-1.8.4-CUDA_NVCC_FLAGS.patch |
8 |
Log: |
9 |
sci-libs/flann: Fix compilation problem with cuda; depend on fixed octave version for gcc-4.8, #492488; patch cmake and send patches upstream instead of sedding, add missing deps; use cuda.eclass; fix HOMEPAGE |
10 |
|
11 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!) |
12 |
|
13 |
Revision Changes Path |
14 |
1.1 sci-libs/flann/files/flann-1.8.4-multilib.patch |
15 |
|
16 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/flann/files/flann-1.8.4-multilib.patch?rev=1.1&view=markup |
17 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/flann/files/flann-1.8.4-multilib.patch?rev=1.1&content-type=text/plain |
18 |
|
19 |
Index: flann-1.8.4-multilib.patch |
20 |
=================================================================== |
21 |
cmake/flann_utils.cmake | 2 +- |
22 |
1 file changed, 1 insertion(+), 1 deletion(-) |
23 |
|
24 |
diff --git a/cmake/flann_utils.cmake b/cmake/flann_utils.cmake |
25 |
index 1a10939..afe4742 100644 |
26 |
--- a/cmake/flann_utils.cmake |
27 |
+++ b/cmake/flann_utils.cmake |
28 |
@@ -1,6 +1,6 @@ |
29 |
macro(GET_OS_INFO) |
30 |
string(REGEX MATCH "Linux" OS_IS_LINUX ${CMAKE_SYSTEM_NAME}) |
31 |
- set(FLANN_LIB_INSTALL_DIR "lib") |
32 |
+ set(FLANN_LIB_INSTALL_DIR "lib${LIB_SUFFIX}") |
33 |
set(FLANN_INCLUDE_INSTALL_DIR |
34 |
"include/${PROJECT_NAME_LOWER}-${FLANN_MAJOR_VERSION}.${FLANN_MINOR_VERSION}") |
35 |
endmacro(GET_OS_INFO) |
36 |
|
37 |
|
38 |
|
39 |
1.1 sci-libs/flann/files/flann-1.8.4-options.patch |
40 |
|
41 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/flann/files/flann-1.8.4-options.patch?rev=1.1&view=markup |
42 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/flann/files/flann-1.8.4-options.patch?rev=1.1&content-type=text/plain |
43 |
|
44 |
Index: flann-1.8.4-options.patch |
45 |
=================================================================== |
46 |
CMakeLists.txt | 13 +++++++++++-- |
47 |
1 file changed, 11 insertions(+), 2 deletions(-) |
48 |
|
49 |
diff --git a/CMakeLists.txt b/CMakeLists.txt |
50 |
index 410a8f9..b6244a4 100644 |
51 |
--- a/CMakeLists.txt |
52 |
+++ b/CMakeLists.txt |
53 |
@@ -54,6 +54,8 @@ option(BUILD_PYTHON_BINDINGS "Build Python bindings" ON) |
54 |
option(BUILD_MATLAB_BINDINGS "Build Matlab bindings" ON) |
55 |
option(BUILD_CUDA_LIB "Build CUDA library" OFF) |
56 |
option(BUILD_EXAMPLES "Build examples" ON) |
57 |
+option(BUILD_TESTS "Build tests" ON) |
58 |
+option(BUILD_DOC "Build documentation" ON) |
59 |
option(USE_OPENMP "Use OpenMP multi-threading" ON) |
60 |
option(USE_MPI "Use MPI" OFF) |
61 |
|
62 |
@@ -158,8 +160,12 @@ add_subdirectory( src ) |
63 |
if (BUILD_EXAMPLES) |
64 |
add_subdirectory( examples ) |
65 |
endif(BUILD_EXAMPLES) |
66 |
-add_subdirectory( test ) |
67 |
-add_subdirectory( doc ) |
68 |
+if (BUILD_TESTS) |
69 |
+ add_subdirectory( test ) |
70 |
+endif (BUILD_TESTS) |
71 |
+if (BUILD_DOC) |
72 |
+ add_subdirectory( doc ) |
73 |
+endif (BUILD_DOC) |
74 |
|
75 |
|
76 |
# CPACK options |
77 |
@@ -202,6 +208,9 @@ include(CPack) |
78 |
message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}") |
79 |
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") |
80 |
message(STATUS "Building C bindings: ${BUILD_C_BINDINGS}") |
81 |
+message(STATUS "Building examples: ${BUILD_EXAMPLES}") |
82 |
+message(STATUS "Building tests: ${BUILD_TESTS}") |
83 |
+message(STATUS "Building documentation: ${BUILD_DOC}") |
84 |
message(STATUS "Building python bindings: ${BUILD_PYTHON_BINDINGS}") |
85 |
message(STATUS "Building matlab bindings: ${BUILD_MATLAB_BINDINGS}") |
86 |
message(STATUS "Building CUDA library: ${BUILD_CUDA_LIB}") |
87 |
|
88 |
|
89 |
|
90 |
1.1 sci-libs/flann/files/flann-1.8.4-docdir.patch |
91 |
|
92 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/flann/files/flann-1.8.4-docdir.patch?rev=1.1&view=markup |
93 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/flann/files/flann-1.8.4-docdir.patch?rev=1.1&content-type=text/plain |
94 |
|
95 |
Index: flann-1.8.4-docdir.patch |
96 |
=================================================================== |
97 |
doc/CMakeLists.txt | 6 +++++- |
98 |
1 file changed, 5 insertions(+), 1 deletion(-) |
99 |
|
100 |
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt |
101 |
index 2d8eb24..aeac8ed 100644 |
102 |
--- a/doc/CMakeLists.txt |
103 |
+++ b/doc/CMakeLists.txt |
104 |
@@ -1,4 +1,8 @@ |
105 |
find_package(LATEX) |
106 |
+ |
107 |
+if (NOT DOCDIR) |
108 |
+ set(DOCDIR share/doc/flann) |
109 |
+endif () |
110 |
|
111 |
if (EXISTS ${PDFLATEX_COMPILER} AND EXISTS ${BIBTEX_COMPILER}) |
112 |
include(${PROJECT_SOURCE_DIR}/cmake/UseLATEX.cmake) |
113 |
@@ -14,6 +18,6 @@ endif() |
114 |
|
115 |
install( |
116 |
FILES manual.pdf |
117 |
- DESTINATION share/doc/flann |
118 |
+ DESTINATION ${DOCDIR} |
119 |
OPTIONAL |
120 |
) |
121 |
|
122 |
|
123 |
|
124 |
1.1 sci-libs/flann/files/flann-1.8.4-cuda5.5.patch |
125 |
|
126 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/flann/files/flann-1.8.4-cuda5.5.patch?rev=1.1&view=markup |
127 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/flann/files/flann-1.8.4-cuda5.5.patch?rev=1.1&content-type=text/plain |
128 |
|
129 |
Index: flann-1.8.4-cuda5.5.patch |
130 |
=================================================================== |
131 |
src/cpp/flann/util/cuda/result_set.h | 12 ++++++------ |
132 |
1 file changed, 6 insertions(+), 6 deletions(-) |
133 |
|
134 |
diff --git a/src/cpp/flann/util/cuda/result_set.h b/src/cpp/flann/util/cuda/result_set.h |
135 |
index 9ac8111..324ca1e 100644 |
136 |
--- a/src/cpp/flann/util/cuda/result_set.h |
137 |
+++ b/src/cpp/flann/util/cuda/result_set.h |
138 |
@@ -54,7 +54,7 @@ struct SingleResultSet |
139 |
DistanceType bestDist; |
140 |
const DistanceType epsError; |
141 |
|
142 |
- __device__ |
143 |
+ __device__ __host__ |
144 |
SingleResultSet( DistanceType eps ) : bestIndex(-1),bestDist(INFINITY), epsError(eps){ } |
145 |
|
146 |
__device__ |
147 |
@@ -129,7 +129,7 @@ struct KnnResultSet |
148 |
const DistanceType epsError; |
149 |
|
150 |
|
151 |
- __device__ |
152 |
+ __device__ __host__ |
153 |
KnnResultSet(int knn, bool sortResults, DistanceType eps) : foundNeighbors(0),largestHeapDist(INFINITY),k(knn), sorted(sortResults), epsError(eps){ } |
154 |
|
155 |
// __host__ __device__ |
156 |
@@ -229,7 +229,7 @@ struct CountingRadiusResultSet |
157 |
DistanceType radius_sq_; |
158 |
int max_neighbors_; |
159 |
|
160 |
- __device__ |
161 |
+ __device__ __host__ |
162 |
CountingRadiusResultSet(DistanceType radius, int max_neighbors) : count_(0),radius_sq_(radius), max_neighbors_(max_neighbors){ } |
163 |
|
164 |
__device__ |
165 |
@@ -279,7 +279,7 @@ struct RadiusKnnResultSet |
166 |
// int count_; |
167 |
|
168 |
|
169 |
- __device__ |
170 |
+ __device__ __host__ |
171 |
RadiusKnnResultSet(DistanceType radius, int knn, int* segment_starts, bool sortResults) : foundNeighbors(0),largestHeapDist(radius),k(knn), sorted(sortResults), radius_sq_(radius),segment_starts_(segment_starts) { } |
172 |
|
173 |
// __host__ __device__ |
174 |
@@ -381,7 +381,7 @@ struct KnnRadiusResultSet |
175 |
const DistanceType radius_sq; |
176 |
|
177 |
|
178 |
- __device__ |
179 |
+ __device__ __host__ |
180 |
KnnRadiusResultSet(int knn, bool sortResults, DistanceType eps, DistanceType radius) : foundNeighbors(0),largestHeapDist(radius),k(knn), sorted(sortResults), epsError(eps),radius_sq(radius){ } |
181 |
|
182 |
// __host__ __device__ |
183 |
@@ -484,7 +484,7 @@ struct RadiusResultSet |
184 |
int count_; |
185 |
bool sorted_; |
186 |
|
187 |
- __device__ |
188 |
+ __device__ __host__ |
189 |
RadiusResultSet(DistanceType radius, int* segment_starts, bool sorted) : radius_sq_(radius), segment_starts_(segment_starts), count_(0), sorted_(sorted){ } |
190 |
|
191 |
__device__ |
192 |
|
193 |
|
194 |
|
195 |
1.1 sci-libs/flann/files/flann-1.8.4-examples.patch |
196 |
|
197 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/flann/files/flann-1.8.4-examples.patch?rev=1.1&view=markup |
198 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/flann/files/flann-1.8.4-examples.patch?rev=1.1&content-type=text/plain |
199 |
|
200 |
Index: flann-1.8.4-examples.patch |
201 |
=================================================================== |
202 |
From 3922081fbd6710f4b72421069f6bf24dc37d35a8 Mon Sep 17 00:00:00 2001 |
203 |
From: Casey Goodlett <casey.goodlett@×××××××.com> |
204 |
Date: Thu, 8 Aug 2013 18:42:45 -0400 |
205 |
Subject: [PATCH] Option to disable example building |
206 |
|
207 |
--- |
208 |
CMakeLists.txt | 5 ++++- |
209 |
1 file changed, 4 insertions(+), 1 deletion(-) |
210 |
|
211 |
diff --git a/CMakeLists.txt b/CMakeLists.txt |
212 |
index 5b19367..410a8f9 100644 |
213 |
--- a/CMakeLists.txt |
214 |
+++ b/CMakeLists.txt |
215 |
@@ -53,6 +53,7 @@ option(BUILD_C_BINDINGS "Build C bindings" ON) |
216 |
option(BUILD_PYTHON_BINDINGS "Build Python bindings" ON) |
217 |
option(BUILD_MATLAB_BINDINGS "Build Matlab bindings" ON) |
218 |
option(BUILD_CUDA_LIB "Build CUDA library" OFF) |
219 |
+option(BUILD_EXAMPLES "Build examples" ON) |
220 |
option(USE_OPENMP "Use OpenMP multi-threading" ON) |
221 |
option(USE_MPI "Use MPI" OFF) |
222 |
|
223 |
@@ -154,7 +155,9 @@ endif() |
224 |
|
225 |
add_subdirectory( cmake ) |
226 |
add_subdirectory( src ) |
227 |
-add_subdirectory( examples ) |
228 |
+if (BUILD_EXAMPLES) |
229 |
+ add_subdirectory( examples ) |
230 |
+endif(BUILD_EXAMPLES) |
231 |
add_subdirectory( test ) |
232 |
add_subdirectory( doc ) |
233 |
|
234 |
-- |
235 |
1.8.5.1 |
236 |
|
237 |
|
238 |
|
239 |
|
240 |
1.1 sci-libs/flann/files/flann-1.8.4-CUDA_NVCC_FLAGS.patch |
241 |
|
242 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/flann/files/flann-1.8.4-CUDA_NVCC_FLAGS.patch?rev=1.1&view=markup |
243 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/flann/files/flann-1.8.4-CUDA_NVCC_FLAGS.patch?rev=1.1&content-type=text/plain |
244 |
|
245 |
Index: flann-1.8.4-CUDA_NVCC_FLAGS.patch |
246 |
=================================================================== |
247 |
src/cpp/CMakeLists.txt | 2 +- |
248 |
1 file changed, 1 insertion(+), 1 deletion(-) |
249 |
|
250 |
diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt |
251 |
index 8e72409..a4b35b1 100644 |
252 |
--- a/src/cpp/CMakeLists.txt |
253 |
+++ b/src/cpp/CMakeLists.txt |
254 |
@@ -15,7 +15,7 @@ endif() |
255 |
set_property(TARGET flann_cpp_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC FLANN_USE_CUDA) |
256 |
|
257 |
if (BUILD_CUDA_LIB) |
258 |
- SET(CUDA_NVCC_FLAGS -DFLANN_USE_CUDA) |
259 |
+ SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-DFLANN_USE_CUDA") |
260 |
if(CMAKE_COMPILER_IS_GNUCC) |
261 |
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-Xcompiler;-fPIC;-arch=sm_13" ) |
262 |
if (NVCC_COMPILER_BINDIR) |