Skip to content
Snippets Groups Projects
Commit 89c070f0 authored by Erik Strand's avatar Erik Strand
Browse files

Add hard coded command to make all plots

I looked into automating this for a bit, but need to spend some more
time figuring out cmake's scoping rules for lists.
parent 424ea216
Branches
Tags
No related merge requests found
......@@ -21,3 +21,5 @@ include(cmake/make_plot_target.cmake)
add_subdirectory(external)
add_subdirectory(optimization)
add_subdirectory(test)
make_meta_plot_target()
#set(PLOT_TARGETS "")
# TODO Enable arguments to be passed to the C++ executable
function(make_plot_target TARGET ID)
message(${ID})
cmake_parse_arguments(PLOT "" "" "ARGS" ${ARGN})
if (VISUALIZE)
add_custom_command(
......@@ -20,5 +21,21 @@ function(make_plot_target TARGET ID)
add_custom_target(${TARGET}_plot_${ID}
DEPENDS ${TARGET}_plot_${ID}.pdf
)
#message(STATUS "another one")
#list(APPEND PLOT_TARGETS ${TARGET}_plot_${ID})
#set(PLOT_TARGETS ${PLOT_TARGETS} PARENT_SCOPE)
#message(STATUS ${PLOT_TARGETS})
endif()
endfunction()
function(make_meta_plot_target)
# TODO Don't hard code this.
add_custom_target(all_plots)
add_dependencies(all_plots gradient_descent_plot_2d)
add_dependencies(all_plots gradient_descent_plot_10d)
add_dependencies(all_plots conjugate_gradient_descent_plot_2d)
add_dependencies(all_plots conjugate_gradient_descent_plot_10d)
add_dependencies(all_plots nelder_mead_plot_2d)
add_dependencies(all_plots nelder_mead_plot_10d)
endfunction()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment