运行nm |使用cmake execute_process的grep命令?

时间:2012-09-21 16:49:10

标签: command cmake external

  

可能重复:
  CMake test for processor feature

我试图用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”

知道如何让它发挥作用吗?

0 个答案:

没有答案