From 8f59de9d2b71a1e65f468b628af45be64bfb5aee Mon Sep 17 00:00:00 2001 From: Chris Kitching Date: Tue, 24 Oct 2017 21:36:51 +0100 Subject: [PATCH] Use cmake's builtin mechanism for handling library locations See [the documentation](https://cmake.org/cmake/help/v3.0/command/find_package.html) for exactly how the search procedure works. If you want to use an LLVM from a specific location, use CMAKE_PREFIX_PATH as normal. No longer do we have a nonstandard HIPIFY_CLANG_LLVM_DIR variable for people to learn about. [ROCm/clr commit: de8dcf0ed234c012ac1e278683d6a8ab7371820b] --- projects/clr/hipamd/CMakeLists.txt | 7 ------- projects/clr/hipamd/hipify-clang/CMakeLists.txt | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/projects/clr/hipamd/CMakeLists.txt b/projects/clr/hipamd/CMakeLists.txt index dd8d604dd2..1c8f640afb 100644 --- a/projects/clr/hipamd/CMakeLists.txt +++ b/projects/clr/hipamd/CMakeLists.txt @@ -125,13 +125,6 @@ else() message(FATAL_ERROR "Don't know where to install HIP. Please specify absolute path using -DCMAKE_INSTALL_PREFIX") endif() -# Check if we need to build hipify-clang -if(NOT DEFINED HIPIFY_CLANG_LLVM_DIR) - if(DEFINED ENV{HIPIFY_CLANG_LLVM_DIR}) - set(HIPIFY_CLANG_LLVM_DIR $ENV{HIPIFY_CLANG_LLVM_DIR}) - endif() -endif() - # Check if we need to enable ATP marker if(NOT DEFINED COMPILE_HIP_ATP_MARKER) if(NOT DEFINED ENV{COMPILE_HIP_ATP_MARKER}) diff --git a/projects/clr/hipamd/hipify-clang/CMakeLists.txt b/projects/clr/hipamd/hipify-clang/CMakeLists.txt index e9709a6f6e..0dc1affec5 100644 --- a/projects/clr/hipamd/hipify-clang/CMakeLists.txt +++ b/projects/clr/hipamd/hipify-clang/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.8.8) project(hipify-clang) -find_package(LLVM PATHS ${HIPIFY_CLANG_LLVM_DIR} REQUIRED NO_DEFAULT_PATH) +find_package(LLVM REQUIRED) message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") option(HIPIFY_CLANG_TESTS "Build the tests for hipify-clang, if lit is installed" OFF)