Skip to content

How to compile only 1 example? #3113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jugal-sheth opened this issue May 2, 2025 · 2 comments
Closed

How to compile only 1 example? #3113

jugal-sheth opened this issue May 2, 2025 · 2 comments

Comments

@jugal-sheth
Copy link

Thank you for providing nice useful examples while working on it I wanted to have some modification but after every change I have to recompile whole lib which is very time consuming I am new to c++ so cant write foolproof code in 1 go can someone please suggest quicker way of doing this

i tried options from make but it was compiling one example as intended but it always rebuild whole ggml-cuda too

Thank you for your time

Apologies if this is irrelevant

@danbev
Copy link
Collaborator

danbev commented May 2, 2025

You can specify a target to build and then only that target will be built. To see the available targets you can run:

$ cmake --build build --target help
The following are some of the valid targets for this Makefile:
... all (the default if no target is provided)
... clean
... depend
... edit_cache
... install
... install/local
... install/strip
... list_install_components
... rebuild_cache
... test
... Continuous
... ContinuousBuild
... ContinuousConfigure
... ContinuousCoverage
... ContinuousMemCheck
... ContinuousStart
... ContinuousSubmit
... ContinuousTest
... ContinuousUpdate
... Experimental
... ExperimentalBuild
... ExperimentalConfigure
... ExperimentalCoverage
... ExperimentalMemCheck
... ExperimentalStart
... ExperimentalSubmit
... ExperimentalTest
... ExperimentalUpdate
... Nightly
... NightlyBuild
... NightlyConfigure
... NightlyCoverage
... NightlyMemCheck
... NightlyMemoryCheck
... NightlyStart
... NightlySubmit
... NightlyTest
... NightlyUpdate
... bench
... common
... ggml
... ggml-base
... ggml-cpu
... main
... quantize
... test-vad
... test-vad-full
... whisper
... whisper-bench
... whisper-cli
... whisper-server

The available targets depends on what options you have configured for CMake.

Then you can run a single target using:

$ cmake --build build --target whisper-cli

@jugal-sheth
Copy link
Author

Thank you for your help @danbev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants