minor fix in cmake.config generation - do not force client libs to include numpy...
authorAnatoly Baksheev <no@email>
Fri, 15 May 2015 14:39:11 +0000 (17:39 +0300)
committerAnatoly Baksheev <no@email>
Fri, 15 May 2015 14:39:12 +0000 (17:39 +0300)
cmake/ConfigGen.cmake

index c82047d..a9101e3 100644 (file)
@@ -11,6 +11,17 @@ function(caffe_get_current_includes includes_variable)
   list(FIND current_includes ${PROJECT_BINARY_DIR} __index)
   list(REMOVE_AT current_includes ${__index})
 
+  # removing numpy includes (since not required for client libs)
+  set(__toremove "")
+  foreach(__i ${current_includes})
+    if(${__i} MATCHES "python")
+      list(APPEND __toremove ${__i})
+    endif()
+  endforeach()
+  if(__toremove)
+    list(REMOVE_ITEM current_includes ${__toremove})
+  endif()
+
   caffe_list_unique(current_includes)
   set(${includes_variable} ${current_includes} PARENT_SCOPE)
 endfunction()