Skip to content

Commit

Permalink
Merge pull request #3650 from intbots/cmake-matlab-fix
Browse files Browse the repository at this point in the history
bugfix for incorrect behaviour in `caffe_parse_linker_libs`
  • Loading branch information
jeffdonahue committed Feb 9, 2016
2 parents b590f1d + 68c751c commit 33f2445
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmake/Utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,11 @@ function(caffe_parse_linker_libs Caffe_LINKER_LIBS_variable folders_var flags_va
elseif(lib MATCHES "^-l.*")
list(APPEND libflags ${lib})
elseif(IS_ABSOLUTE ${lib})
get_filename_component(name_we ${lib} NAME_WE)
get_filename_component(folder ${lib} PATH)
get_filename_component(filename ${lib} NAME)
string(REGEX REPLACE "\\.[^.]*$" "" filename_without_shortest_ext ${filename})

string(REGEX MATCH "^lib(.*)" __match ${name_we})
string(REGEX MATCH "^lib(.*)" __match ${filename_without_shortest_ext})
list(APPEND libflags -l${CMAKE_MATCH_1})
list(APPEND folders ${folder})
else()
Expand Down

0 comments on commit 33f2445

Please sign in to comment.