not able to perform execute_process()

I invoked execute_process as below

execute_process(
  COMMAND
  ${POST_PROCESSOR} --filter=ensight --file=${PREFIX}
  WORKING_DIRECTORY ${TEST_DIR}
  COMMAND_ECHO STDOUT
 OUTPUT_VARIABLE log2
 ERROR_VARIABLE err2
 RESULT_VARIABLE status
)

execute_process does nothing and exports nothing to log2 and err2 variable. However when I execute the command echoed out to the terminal everything works normally. What could be the reason why the command is not executed in this case?

Is it actually running what you expect? Is status showing that there’s an error state? You can use cmake --trace-expand to see what those variables expand to; perhaps they don’t match what you expect?