Previous Several useful CMake functions |
Parent Several useful CMake functions |
Outline | Next The runPythonExample function |
1 2 3 4 5 6 7 8 9 10 |
function(runExample targetName) add_custom_command(OUTPUT ${OUTPUT_PERF_DIR}/${targetName}.txt COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${targetName} 2> ${OUTPUT_PERF_DIR}/${targetName}.txt WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMENT "Run ${targetName} program" DEPENDS ${targetName} ) add_custom_target("run_${targetName}" DEPENDS ${OUTPUT_PERF_DIR}/${targetName}.txt) add_dependencies(run_all "run_${targetName}") endfunction(runExample) |
Previous Several useful CMake functions |
Parent Several useful CMake functions |
Outline | Next The runPythonExample function |