Commit 676fff87 authored by Milian Wolff's avatar Milian Wolff
Browse files

Find LLVM quietly from FindClang

Add support for quietly finding clang and llvm and use it for
the latter. This way we don't get the repeated output for more
modern versions that don't yet exist on our platform.
parent 0d49383e
Pipeline #192925 passed with stage
in 16 minutes and 3 seconds
......@@ -32,7 +32,7 @@ foreach(version ${KNOWN_VERSIONS})
break()
endif()
find_package(LLVM ${version})
find_package(LLVM ${version} QUIET)
endforeach()
if (${Clang_FIND_REQUIRED})
......@@ -138,11 +138,13 @@ if(CLANG_FOUND)
endif()
endif()
message(STATUS "Found Clang (LLVM version: ${CLANG_VERSION})")
message(STATUS " Include dirs: ${CLANG_INCLUDE_DIRS}")
message(STATUS " Clang libraries: ${CLANG_LIBS}")
message(STATUS " Libclang C library: ${CLANG_CLANG_LIB}")
message(STATUS " Builtin include dir: ${CLANG_BUILTIN_DIR}")
if(NOT Clang_FIND_QUIETLY)
message(STATUS "Found Clang (LLVM version: ${CLANG_VERSION})")
message(STATUS " Include dirs: ${CLANG_INCLUDE_DIRS}")
message(STATUS " Clang libraries: ${CLANG_LIBS}")
message(STATUS " Libclang C library: ${CLANG_CLANG_LIB}")
message(STATUS " Builtin include dir: ${CLANG_BUILTIN_DIR}")
endif()
else()
if(Clang_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find Clang")
......
......@@ -141,11 +141,11 @@ endif()
if (LLVM_FIND_REQUIRED AND NOT LLVM_FOUND)
message(FATAL_ERROR "Could not find LLVM: ${_LLVM_ERROR_MESSAGE}")
elseif(_LLVM_ERROR_MESSAGE)
elseif(_LLVM_ERROR_MESSAGE AND NOT LLVM_FIND_QUIETLY)
message(STATUS "Could not find LLVM: ${_LLVM_ERROR_MESSAGE}")
endif()
if (LLVM_FOUND)
if(LLVM_FOUND AND NOT LLVM_FIND_QUIETLY)
message(STATUS "Found LLVM (version: ${LLVM_VERSION}): (using ${LLVM_CONFIG_EXECUTABLE})")
message(STATUS " Include dirs: ${LLVM_INCLUDE_DIRS}")
message(STATUS " LLVM libraries: ${LLVM_LIBS}")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment