Skip to content

libclc CMake error: unknown arguments specified #54315

@hwnam831

Description

@hwnam831

I cannot build libclc in both llvm-13 and llvm-15 due to the following error:

`LLVM version:
CMake Error at /home/hwnam/llvm-project/libclc/CMakeLists.txt:51 (if):
if given arguments:

"VERSION_LESS" "3.9.0"

Unknown arguments specified`

It seems like the following function does not set the environmental variable $LLVM_VERSION correctly.
`execute_process( COMMAND ${LLVM_CONFIG} "--version"
OUTPUT_VARIABLE LLVM_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE )
message( "LLVM version: ${LLVM_VERSION}" )

if( ${LLVM_VERSION} VERSION_LESS ${LIBCLC_MIN_LLVM} )
message( FATAL_ERROR "libclc needs at least LLVM ${LIBCLC_MIN_LLVM}" )
endif()`

Is there any additional argument/environment I need to build libclc?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions