-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #666 from dstoup/patch-caffes-framework-path
Patch caffes framework path
- Loading branch information
Showing
4 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
Patches/Caffe/7f5cea3b2986a7d2c913b716eb524c27b6b2ba7b/Patch.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
Patches/Caffe/7f5cea3b2986a7d2c913b716eb524c27b6b2ba7b/cmake/Modules/FindvecLib.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Find the vecLib libraries as part of Accelerate.framework or as standalon framework | ||
# | ||
# The following are set after configuration is done: | ||
# VECLIB_FOUND | ||
# vecLib_INCLUDE_DIR | ||
# vecLib_LINKER_LIBS | ||
|
||
|
||
if(NOT APPLE) | ||
return() | ||
endif() | ||
|
||
set(__veclib_include_suffix "Frameworks/vecLib.framework/Versions/Current/Headers") | ||
|
||
find_path(vecLib_INCLUDE_DIR vecLib.h | ||
DOC "vecLib include directory" | ||
PATHS /System/Library/Frameworks/Accelerate.framework/Versions/Current/${__veclib_include_suffix} | ||
/System/Library/${__veclib_include_suffix} | ||
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/ | ||
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/ | ||
NO_DEFAULT_PATH) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(vecLib DEFAULT_MSG vecLib_INCLUDE_DIR) | ||
|
||
if(VECLIB_FOUND) | ||
if(vecLib_INCLUDE_DIR MATCHES "^/System/Library/Frameworks/vecLib.framework.*") | ||
set(vecLib_LINKER_LIBS -lcblas "-framework vecLib") | ||
message(STATUS "Found standalone vecLib.framework") | ||
else() | ||
set(vecLib_LINKER_LIBS -lcblas "-framework Accelerate") | ||
message(STATUS "Found vecLib as part of Accelerate.framework") | ||
endif() | ||
|
||
mark_as_advanced(vecLib_INCLUDE_DIR) | ||
endif() |
7 changes: 7 additions & 0 deletions
7
Patches/Caffe_Segnet/abcf30dca449245e101bf4ced519f716177f0885/Patch.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
Patches/Caffe_Segnet/abcf30dca449245e101bf4ced519f716177f0885/cmake/Modules/FindvecLib.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Find the vecLib libraries as part of Accelerate.framework or as standalon framework | ||
# | ||
# The following are set after configuration is done: | ||
# VECLIB_FOUND | ||
# vecLib_INCLUDE_DIR | ||
# vecLib_LINKER_LIBS | ||
|
||
|
||
if(NOT APPLE) | ||
return() | ||
endif() | ||
|
||
set(__veclib_include_suffix "Frameworks/vecLib.framework/Versions/Current/Headers") | ||
|
||
find_path(vecLib_INCLUDE_DIR vecLib.h | ||
DOC "vecLib include directory" | ||
PATHS /System/Library/Frameworks/Accelerate.framework/Versions/Current/${__veclib_include_suffix} | ||
/System/Library/${__veclib_include_suffix} | ||
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/ | ||
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/ | ||
NO_DEFAULT_PATH) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(vecLib DEFAULT_MSG vecLib_INCLUDE_DIR) | ||
|
||
if(VECLIB_FOUND) | ||
if(vecLib_INCLUDE_DIR MATCHES "^/System/Library/Frameworks/vecLib.framework.*") | ||
set(vecLib_LINKER_LIBS -lcblas "-framework vecLib") | ||
message(STATUS "Found standalone vecLib.framework") | ||
else() | ||
set(vecLib_LINKER_LIBS -lcblas "-framework Accelerate") | ||
message(STATUS "Found vecLib as part of Accelerate.framework") | ||
endif() | ||
|
||
mark_as_advanced(vecLib_INCLUDE_DIR) | ||
endif() |