Skip to content

Can not build whisper-cli if I have CMake.js (CMAKE_JS_VERSION is set) #3627

@gkostov

Description

@gkostov

I'm mostly interested in using whisper.cpp in node.js and so I built the node addon. But then I wanted to check the whisper-cli and followed the instructions to:

# build the project
cmake -B build
cmake --build build -j --config Release

but then there was no ./build/bin/whisper-cli. Then tried

cmake --build build -j --config Release -t whisper-cli

Just to be greeted with make[1]: *** No rule to make target 'whisper-cli'. Stop.
I tried to make sense of what targets got built without the -t and checked the config files and saw this

elseif(CMAKE_JS_VERSION)
add_subdirectory(addon.node)
else()
add_subdirectory(cli)

So it seemed like me having installed CMake.js makes it only build the node addon. Moving add_subdirectory(cli) one line up made the "whisper-cli" target available and it got built correctly.

I'm curious if this has been done on purpose or if it's just an overlook, or maybe a workaround for some problem? I don't see how CMake.js would preclude the cli from being on the available targets list.

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions