Dear users,
As a new user CMake I've come across some things I don't fully
understand yet. Here is such a thing:
when I build documentation, I want to run some files from a 'demo'
subdirectory and create output - suppose the (binary) file is called
'func1_demo', then in my old Makefiles I used to do:
./func1_demo >& func1_demo.out
I implemented this in CMake using a special 'RunCommand.cmake' script
that does:
execute_process(COMMAND ${dbin} OUTPUT_FILE ${dbin_out} ERROR_FILE
${dbin_out})
and the CMakeLists.txt file that creates the demos, has
${CMAKE_COMMAND} -Ddbin="./${demo_name}" -Ddbin_out="${demo_name}.out"
-P RunCommand.cmake
as the COMMAND part of an add_custom_command. It seems a bit contrived,
having to pass these variables through the command line to a separate
file. Is there a better way to do this?
Yours sincerely,
Jakob van Bethlehem
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake