标签:overflow proc targe err https 参数 pre flow turn
使用execute_process
参数必须要传,不用也要传空
set(getdep1 ${CMAKE_SOURCE_DIR}/clone.sh)
execute_process(
COMMAND ${getdep1} ""
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/dep
RESULT_VARIABLE result
OUTPUT_VARIABLE output
)
if(result EQUAL 0)
message(STATUS "task done")
else()
message(STATUS "task Error! " "return code: " ${result})
endif()
set(MAKE_CMD "${CMAKE_CURRENT_SOURCE_DIR}/makeHeaders.sh")
MESSAGE("COMMAND: ${MAKE_CMD} ${CMAKE_CURRENT_SOURCE_DIR} ${INC_DIR}")
execute_process(COMMAND ${MAKE_CMD} ${CMAKE_CURRENT_SOURCE_DIR} ${INC_DIR}
RESULT_VARIABLE CMD_ERROR
OUTPUT_FILE CMD_OUTPUT)
MESSAGE( STATUS "CMD_ERROR:" ${CMD_ERROR})
MESSAGE( STATUS "CMD_OUTPUT:" ${CMD_OUTPUT})
https://stackoverflow.com/questions/43684051/cmake-execute-process-command
标签:overflow proc targe err https 参数 pre flow turn
原文地址:https://www.cnblogs.com/Searchor/p/14154019.html