diff --git a/CMakeLists.txt b/CMakeLists.txt index cfbfee60c6..2f14035496 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,6 +84,13 @@ else() set(LLAMA_TOOLS_INSTALL_DEFAULT ${LLAMA_STANDALONE}) endif() +# subprocess spawning isn't a supported/sandbox-friendly operation on mobile OSes +if (CMAKE_SYSTEM_NAME STREQUAL "iOS" OR CMAKE_SYSTEM_NAME STREQUAL "Android" OR ANDROID) + set(LLAMA_SUBPROCESS_DEFAULT OFF) +else() + set(LLAMA_SUBPROCESS_DEFAULT ON) +endif() + # # option list # @@ -117,7 +124,7 @@ option(LLAMA_TESTS_INSTALL "llama: install tests" ON) # 3rd party libs option(LLAMA_OPENSSL "llama: use openssl to support HTTPS" ON) -option(LLAMA_SUBPROCESS "llama-common: use subprocess, required by server tools and server router mode" ON) +option(LLAMA_SUBPROCESS "llama-common: use subprocess, required by server tools and server router mode" ${LLAMA_SUBPROCESS_DEFAULT}) option(LLAMA_LLGUIDANCE "llama-common: include LLGuidance library for structured output in common utils" OFF)