title: run nm | grep commands with cmake execute_process?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/8994255/cmake-test-for-processor-feature">CMake test for processor feature</a>  </p>
  </blockquote>
  
  
  
  <p>Im trying to run the following command with cmake execute_process:</p>
  
  <pre><code>nm /home/cquiros/GOBLET/tools/3rdParty/shapelib/libshp.a | grep 'DBFReorderFields'
  </code></pre>
  
  <p>But I always command not found. This is the code:</p>
  
  <pre><code>SET (CMD "nm")
  SET (CMDA "${SHAPELIB_LIBRARY} | grep 'DBFReorderFields'")
  
  execute_process(COMMAND ${CMD} ${CMDA} RESULT_VARIABLE rv)
  </code></pre>
  
  <p>${SHAPELIB_LIBRARY} = /home/cquiros/GOBLET/tools/3rdParty/shapelib/libshp.a . The result should be empty or "000000000000358d T DBFReorderFields"</p>
  
  <p>Any idea how to make it work?</p>