at 18.09-beta 2.3 kB view raw
1diff --git a/CMakeLists.txt b/CMakeLists.txt 2index 40a685b7e..c452efd09 100644 3--- a/CMakeLists.txt 4+++ b/CMakeLists.txt 5@@ -49,10 +49,10 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") 6 7 set(LLVM_VERSION "${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}") 8 9-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/llvm-as${CMAKE_EXECUTABLE_SUFFIX}" LLVM_AS) 10-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/llvm-nm${CMAKE_EXECUTABLE_SUFFIX}" LLVM_NM) 11-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/clang${CMAKE_EXECUTABLE_SUFFIX}" CLANG) 12-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/llvm-config${CMAKE_EXECUTABLE_SUFFIX}" LLVM_CONFIG) 13+find_program(LLVM_AS llvm-as HINTS ${LLVM_TOOLS_BINARY_DIR}) 14+find_program(LLVM_NM llvm-nm HINTS ${LLVM_TOOLS_BINARY_DIR}) 15+find_program(CLANG clang HINTS ${LLVM_TOOLS_BINARY_DIR}) 16+find_program(LLVM_CONFIG llvm-config HINTS ${LLVM_TOOLS_BINARY_DIR}) 17 18 # LLVM doesn't appear to expose --system-libs via its CMake interface, 19 # so we must shell out to llvm-config to find this info 20diff --git a/apps/linear_algebra/CMakeLists.txt b/apps/linear_algebra/CMakeLists.txt 21index 132c80e6a..36ce865f2 100644 22--- a/apps/linear_algebra/CMakeLists.txt 23+++ b/apps/linear_algebra/CMakeLists.txt 24@@ -26,7 +26,7 @@ if (CBLAS_FOUND) 25 # Atlas requires also linking against its provided libcblas for cblas symbols 26 set(ATLAS_EXTRA_LIBS cblas) # XXX fragile 27 set(OpenBLAS_EXTRA_LIBS) 28- set(BLAS_VENDORS OpenBLAS ATLAS) 29+ set(BLAS_VENDORS OpenBLAS) 30 31 # TODO 32 # there are more vendors we could add here that support the cblas interface 33@@ -41,6 +41,7 @@ if (CBLAS_FOUND) 34 message(STATUS " ${BLAS_VENDOR}: Missing") 35 else() 36 message(STATUS " ${BLAS_VENDOR}: Found") 37+ set(BLAS_LIBRARIES "${BLAS_LIBRARIES}" CACHE FILEPATH "BLAS library to use") 38 list(APPEND BLAS_VENDORS ${NAME}) 39 endif() 40 endforeach() 41diff --git a/apps/linear_algebra/tests/CMakeLists.txt b/apps/linear_algebra/tests/CMakeLists.txt 42index 4b95eb3bb..1daa97437 100644 43--- a/apps/linear_algebra/tests/CMakeLists.txt 44+++ b/apps/linear_algebra/tests/CMakeLists.txt 45@@ -19,6 +19,6 @@ target_compile_options(test_halide_blas PRIVATE -Wno-unused-variable) 46 target_link_libraries(test_halide_blas 47 PRIVATE 48 halide_blas 49- cblas # XXX fragile 50+ ${BLAS_LIBRARIES} 51 Halide 52 ) 53-- 542.15.0 55