cmake build, configurable from env (#2115)

- make sure the defaults in `cmake/cmake_extension.py` variable
  `extra_cmake_args` can be overriden by `cmake_args` from
  `SHERPA_ONNX_CMAKE_ARGS` env variable
- fix a bug in `sherpa-onnx/csrc/parse-options.cc` which appears
  when using `-DSHERPA_ONNX_ENABLE_CHECK=ON`
- avoid copying binaries when these are disabled
This commit is contained in:
Karel Vesely
2025-04-16 15:26:54 +02:00
committed by GitHub
parent 7a78f2eb7a
commit f3d23aa170
3 changed files with 17 additions and 8 deletions

View File

@@ -261,9 +261,6 @@ static bool MustBeQuoted(const std::string &str, ShellType st) {
// pasted into a shell of ShellType "st" (only bash for now), it
// will get passed to the program in the same way.
static std::string QuoteAndEscape(const std::string &str, ShellType /*st*/) {
// Only Bash is supported (for the moment).
SHERPA_ONNX_CHECK_EQ(st, kBash) << "Invalid shell type.";
// For now we use the following rules:
// In the normal case, we quote with single-quote "'", and to escape
// a single-quote we use the string: '\'' (interpreted as closing the