Skip to content

Commit e251f56

Browse files
authored
[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.
1 parent ae28028 commit e251f56

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

libclc/CMakeLists.txt

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ option( ENABLE_RUNTIME_SUBNORMAL "Enable runtime linking of subnormal support."
4545
find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}")
4646
include(AddLLVM)
4747

48-
message( "LLVM version: ${LLVM_PACKAGE_VERSION}" )
48+
message( STATUS "libclc LLVM version: ${LLVM_PACKAGE_VERSION}" )
4949

5050
if( ${LLVM_PACKAGE_VERSION} VERSION_LESS ${LIBCLC_MIN_LLVM} )
5151
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 )
6767
find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )
6868

6969
# Print toolchain
70-
message( "clang: ${LLVM_CLANG}" )
71-
message( "llvm-as: ${LLVM_AS}" )
72-
message( "llvm-link: ${LLVM_LINK}" )
73-
message( "opt: ${LLVM_OPT}" )
74-
message( "llvm-spirv: ${LLVM_SPIRV}" )
75-
message( "" )
70+
message( STATUS "libclc toolchain - clang: ${LLVM_CLANG}" )
71+
message( STATUS "libclc toolchain - llvm-as: ${LLVM_AS}" )
72+
message( STATUS "libclc toolchain - llvm-link: ${LLVM_LINK}" )
73+
message( STATUS "libclc toolchain - opt: ${LLVM_OPT}" )
74+
message( STATUS "libclc toolchain - llvm-spirv: ${LLVM_SPIRV}" )
7675
if( NOT LLVM_CLANG OR NOT LLVM_OPT OR NOT LLVM_AS OR NOT LLVM_LINK )
77-
message( FATAL_ERROR "toolchain incomplete!" )
76+
message( FATAL_ERROR "libclc toolchain incomplete!" )
7877
endif()
7978

8079
list( SORT LIBCLC_TARGETS_TO_BUILD )
@@ -182,7 +181,7 @@ add_custom_target( "clspv-generate_convert.cl" DEPENDS clspv-convert.cl )
182181
enable_testing()
183182

184183
foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
185-
message( "BUILDING ${t}" )
184+
message( STATUS "libclc target '${t}' is enabled" )
186185
string( REPLACE "-" ";" TRIPLE ${t} )
187186
list( GET TRIPLE 0 ARCH )
188187
list( GET TRIPLE 1 VENDOR )
@@ -265,7 +264,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
265264
set( mcpu "-mcpu=${d}" )
266265
set( arch_suffix "${d}-${t}" )
267266
endif()
268-
message( " DEVICE: ${d} ( ${${d}_aliases} )" )
267+
message( STATUS " device: ${d} ( ${${d}_aliases} )" )
269268

270269
if ( ${ARCH} STREQUAL "spirv" OR ${ARCH} STREQUAL "spirv64" )
271270
if( ${ARCH} STREQUAL "spirv" )

0 commit comments

Comments
 (0)