diff --git a/CMakeLists.txt b/CMakeLists.txt index cf10d4a..893b59f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,26 +5,24 @@ set(CMAKE_PROJECT_DESCRIPTION "Executing CUDA on non-NVIDIA architecture.") set(CMAKE_CXX_STANDARD "14") if(DEFINED LLVM_CONFIG_PATH) - if(IS_ABSOLUTE "${LLVM_CONFIG_PATH}") - if(EXISTS "${LLVM_CONFIG_PATH}") - set(LLVM_CONFIG "${LLVM_CONFIG_PATH}") - else() - message(FATAL_ERROR "llvm-config is not found in ${LLVM_CONFIG_PATH}") - endif() - message(STATUS "Using llvm-config: ${LLVM_CONFIG}") - execute_process( - COMMAND "${LLVM_CONFIG}" "--cxxflags" - OUTPUT_VARIABLE LLVM_CXX_FLAG - OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process( - COMMAND "${LLVM_CONFIG}" "--libdir" - OUTPUT_VARIABLE LLVM_LIB_PATH - OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process( - COMMAND "${LLVM_CONFIG}" "--libs" - OUTPUT_VARIABLE LLVM_LINK_FLAG - OUTPUT_STRIP_TRAILING_WHITESPACE) + if(EXISTS "${LLVM_CONFIG_PATH}") + set(LLVM_CONFIG "${LLVM_CONFIG_PATH}") + else() + message(FATAL_ERROR "llvm-config is not found in ${LLVM_CONFIG_PATH}") endif() + message(STATUS "Using llvm-config: ${LLVM_CONFIG}") + execute_process( + COMMAND "${LLVM_CONFIG}" "--cxxflags" + OUTPUT_VARIABLE LLVM_CXX_FLAG + OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process( + COMMAND "${LLVM_CONFIG}" "--libdir" + OUTPUT_VARIABLE LLVM_LIB_PATH + OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process( + COMMAND "${LLVM_CONFIG}" "--libs" + OUTPUT_VARIABLE LLVM_LINK_FLAG + OUTPUT_STRIP_TRAILING_WHITESPACE) else() message(FATAL_ERROR "llvm-config is required") endif()