【发布时间】:2022-01-16 10:50:52
【问题描述】:
在我的CMakeLists.txt 中,我需要执行位于/include/ff 下的mapping_string.sh 脚本。该脚本需要用户输入“y”才能继续。
我尝试了这种方法,但我只能无限打印“mapping_string.sh”字符串。
execute_process(
COMMAND yes | bash mapping_string.sh
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/include/ff
RESULT_VARIABLE FF_MS_RES
)
【问题讨论】:
-
正如in this question 解释的那样,您需要运行 bash "-c" "your script"