我试图用cmake execute_process运行以下命令:
nm /home/cquiros/GOBLET/tools/3rdParty/shapelib/libshp.a | grep 'DBFReorderFields'
但我总是命令找不到。这是代码:
SET (CMD "nm")
SET (CMDA "${SHAPELIB_LIBRARY} | grep 'DBFReorderFields'")
execute_process(COMMAND ${CMD} ${CMDA} RESULT_VARIABLE rv)
$ {SHAPELIB_LIBRARY} = /home/cquiros/GOBLET/tools/3rdParty/shapelib/libshp.a。结果应为空或“000000000000358d T DBFReorderFields”
知道如何让它发挥作用吗?