1 2 ADD_CUSTOM_TARGET(copy_scripts) 3 4 SET(script_files go_mean mk_mean_script.sh mk_new_gnuplot.sh 5 perlib_plot_settings.txt action_settings.txt gnuplot_common_settings.hh ) 6 7 FOREACH(script_file ${script_files}) 8 ADD_CUSTOM_COMMAND( 9 TARGET copy_scripts 10 POST_BUILD 11 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${script_file} ${CMAKE_CURRENT_BINARY_DIR}/ 12 ARGS 13 ) 14 ENDFOREACH(script_file) 15 16 ADD_CUSTOM_COMMAND( 17 TARGET copy_scripts 18 POST_BUILD 19 COMMAND ${CMAKE_CXX_COMPILER} --version | head -n 1 > ${CMAKE_CURRENT_BINARY_DIR}/compiler_version.txt 20 ARGS 21 ) 22 ADD_CUSTOM_COMMAND( 23 TARGET copy_scripts 24 POST_BUILD 25 COMMAND echo "${Eigen_SOURCE_DIR}" > ${CMAKE_CURRENT_BINARY_DIR}/eigen_root_dir.txt 26 ARGS 27 ) 28 29 add_executable(smooth smooth.cxx) 30 add_executable(regularize regularize.cxx) 31 add_executable(main mean.cxx) 32 add_dependencies(main copy_scripts) 33