2018-08-01 13:57:51 +01:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2019-09-29 12:45:50 +01:00
|
|
|
index 4ba384324..7e23038f7 100644
|
2018-08-01 13:57:51 +01:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2019-09-29 12:45:50 +01:00
|
|
|
@@ -75,10 +75,10 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
|
|
|
|
2018-08-01 13:57:51 +01:00
|
|
|
set(LLVM_VERSION "${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}")
|
2019-09-29 12:45:50 +01:00
|
|
|
|
2018-08-01 13:57:51 +01:00
|
|
|
-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/llvm-as${CMAKE_EXECUTABLE_SUFFIX}" LLVM_AS)
|
|
|
|
-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/llvm-nm${CMAKE_EXECUTABLE_SUFFIX}" LLVM_NM)
|
|
|
|
-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/clang${CMAKE_EXECUTABLE_SUFFIX}" CLANG)
|
|
|
|
-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/llvm-config${CMAKE_EXECUTABLE_SUFFIX}" LLVM_CONFIG)
|
|
|
|
+find_program(LLVM_AS llvm-as HINTS ${LLVM_TOOLS_BINARY_DIR})
|
|
|
|
+find_program(LLVM_NM llvm-nm HINTS ${LLVM_TOOLS_BINARY_DIR})
|
|
|
|
+find_program(CLANG clang HINTS ${LLVM_TOOLS_BINARY_DIR})
|
|
|
|
+find_program(LLVM_CONFIG llvm-config HINTS ${LLVM_TOOLS_BINARY_DIR})
|
2019-09-29 12:45:50 +01:00
|
|
|
|
2018-08-01 13:57:51 +01:00
|
|
|
# LLVM doesn't appear to expose --system-libs via its CMake interface,
|
|
|
|
# so we must shell out to llvm-config to find this info
|
|
|
|
diff --git a/apps/linear_algebra/CMakeLists.txt b/apps/linear_algebra/CMakeLists.txt
|
|
|
|
index 132c80e6a..36ce865f2 100644
|
|
|
|
--- a/apps/linear_algebra/CMakeLists.txt
|
|
|
|
+++ b/apps/linear_algebra/CMakeLists.txt
|
|
|
|
@@ -26,7 +26,7 @@ if (CBLAS_FOUND)
|
|
|
|
# Atlas requires also linking against its provided libcblas for cblas symbols
|
|
|
|
set(ATLAS_EXTRA_LIBS cblas) # XXX fragile
|
|
|
|
set(OpenBLAS_EXTRA_LIBS)
|
|
|
|
- set(BLAS_VENDORS OpenBLAS ATLAS)
|
|
|
|
+ set(BLAS_VENDORS OpenBLAS)
|
2019-09-29 12:45:50 +01:00
|
|
|
|
2018-08-01 13:57:51 +01:00
|
|
|
# TODO
|
|
|
|
# there are more vendors we could add here that support the cblas interface
|
|
|
|
@@ -41,6 +41,7 @@ if (CBLAS_FOUND)
|
|
|
|
message(STATUS " ${BLAS_VENDOR}: Missing")
|
|
|
|
else()
|
|
|
|
message(STATUS " ${BLAS_VENDOR}: Found")
|
|
|
|
+ set(BLAS_LIBRARIES "${BLAS_LIBRARIES}" CACHE FILEPATH "BLAS library to use")
|
|
|
|
list(APPEND BLAS_VENDORS ${NAME})
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
diff --git a/apps/linear_algebra/tests/CMakeLists.txt b/apps/linear_algebra/tests/CMakeLists.txt
|
2019-09-29 12:45:50 +01:00
|
|
|
index cc02eb0a4..c20419a0d 100644
|
2018-08-01 13:57:51 +01:00
|
|
|
--- a/apps/linear_algebra/tests/CMakeLists.txt
|
|
|
|
+++ b/apps/linear_algebra/tests/CMakeLists.txt
|
2019-09-29 12:45:50 +01:00
|
|
|
@@ -19,7 +19,7 @@ target_compile_options(test_halide_blas PRIVATE -Wno-unused-variable)
|
2018-08-01 13:57:51 +01:00
|
|
|
target_link_libraries(test_halide_blas
|
|
|
|
PRIVATE
|
|
|
|
halide_blas
|
|
|
|
- cblas # XXX fragile
|
|
|
|
+ ${BLAS_LIBRARIES}
|
2019-09-29 12:45:50 +01:00
|
|
|
${HALIDE_COMPILER_LIB}
|
2018-08-01 13:57:51 +01:00
|
|
|
)
|
2019-09-29 12:45:50 +01:00
|
|
|
|
|
|
|
--
|
|
|
|
2.23.0
|
2018-08-01 13:57:51 +01:00
|
|
|
|