mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 23:49:22 +08:00
[libclc] Make CMake messages better fit into LLVM (#86945)
The libclc project is currently only properly supported as an external project. However, when trying to get it to also build in-tree, the CMake configuration messages it outputs stand out amongst the rest of the LLVM projects and sub-projects. This commit makes all messages clear that they belong to the libclc project, as well as turning them into 'STATUS' messages where appropriate.
This commit is contained in:
@@ -45,7 +45,7 @@ option( ENABLE_RUNTIME_SUBNORMAL "Enable runtime linking of subnormal support."
|
||||
find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}")
|
||||
include(AddLLVM)
|
||||
|
||||
message( "LLVM version: ${LLVM_PACKAGE_VERSION}" )
|
||||
message( STATUS "libclc LLVM version: ${LLVM_PACKAGE_VERSION}" )
|
||||
|
||||
if( ${LLVM_PACKAGE_VERSION} VERSION_LESS ${LIBCLC_MIN_LLVM} )
|
||||
message( FATAL_ERROR "libclc needs at least LLVM ${LIBCLC_MIN_LLVM}" )
|
||||
@@ -67,14 +67,13 @@ find_program( LLVM_OPT opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )
|
||||
find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )
|
||||
|
||||
# Print toolchain
|
||||
message( "clang: ${LLVM_CLANG}" )
|
||||
message( "llvm-as: ${LLVM_AS}" )
|
||||
message( "llvm-link: ${LLVM_LINK}" )
|
||||
message( "opt: ${LLVM_OPT}" )
|
||||
message( "llvm-spirv: ${LLVM_SPIRV}" )
|
||||
message( "" )
|
||||
message( STATUS "libclc toolchain - clang: ${LLVM_CLANG}" )
|
||||
message( STATUS "libclc toolchain - llvm-as: ${LLVM_AS}" )
|
||||
message( STATUS "libclc toolchain - llvm-link: ${LLVM_LINK}" )
|
||||
message( STATUS "libclc toolchain - opt: ${LLVM_OPT}" )
|
||||
message( STATUS "libclc toolchain - llvm-spirv: ${LLVM_SPIRV}" )
|
||||
if( NOT LLVM_CLANG OR NOT LLVM_OPT OR NOT LLVM_AS OR NOT LLVM_LINK )
|
||||
message( FATAL_ERROR "toolchain incomplete!" )
|
||||
message( FATAL_ERROR "libclc toolchain incomplete!" )
|
||||
endif()
|
||||
|
||||
list( SORT LIBCLC_TARGETS_TO_BUILD )
|
||||
@@ -182,7 +181,7 @@ add_custom_target( "clspv-generate_convert.cl" DEPENDS clspv-convert.cl )
|
||||
enable_testing()
|
||||
|
||||
foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
|
||||
message( "BUILDING ${t}" )
|
||||
message( STATUS "libclc target '${t}' is enabled" )
|
||||
string( REPLACE "-" ";" TRIPLE ${t} )
|
||||
list( GET TRIPLE 0 ARCH )
|
||||
list( GET TRIPLE 1 VENDOR )
|
||||
@@ -265,7 +264,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
|
||||
set( mcpu "-mcpu=${d}" )
|
||||
set( arch_suffix "${d}-${t}" )
|
||||
endif()
|
||||
message( " DEVICE: ${d} ( ${${d}_aliases} )" )
|
||||
message( STATUS " device: ${d} ( ${${d}_aliases} )" )
|
||||
|
||||
if ( ${ARCH} STREQUAL "spirv" OR ${ARCH} STREQUAL "spirv64" )
|
||||
if( ${ARCH} STREQUAL "spirv" )
|
||||
|
||||
Reference in New Issue
Block a user