[libclc] e251f56 - [libclc] Make CMake messages better fit into LLVM (#86945)

via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 28 08:11:34 PDT 2024


Author: Fraser Cormack
Date: 2024-03-28T15:11:30Z
New Revision: e251f56a4d808340765112dd78edc6e6619dd05b

URL: https://github.com/llvm/llvm-project/commit/e251f56a4d808340765112dd78edc6e6619dd05b
DIFF: https://github.com/llvm/llvm-project/commit/e251f56a4d808340765112dd78edc6e6619dd05b.diff

LOG: [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.

Added: 
    

Modified: 
    libclc/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index 745b848fba4901..9236f09d366782 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -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" )


        


More information about the cfe-commits mailing list