File tree Expand file tree Collapse file tree 2 files changed +28
-5
lines changed Expand file tree Collapse file tree 2 files changed +28
-5
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ set(all_advec_examples
3030foreach (example ${all_advec_examples} )
3131 add_executable (${example} ${CMAKE_CURRENT_SOURCE_DIR} /${example} .cpp)
3232 if (NOT FFTW_FOUND)
33- add_dependencies (${example} fftw3)
33+ add_dependencies (${example} fftw3)
3434 endif ()
3535 target_link_libraries (${example}
3636 ${FFTW_LIBRARIES}
@@ -55,7 +55,7 @@ endforeach(example)
5555if (${pfasst_WITH_MPI} )
5656 include_directories (${MPI_CXX_INCLUDE_PATH} )
5757 foreach (example ${advec_mpi_examples} )
58- if (MPI_COMPILE_FLAGS)
58+ if (MPI_COMPILE_FLAGS)
5959 set_target_properties (${example} PROPERTIES COMPILE_FLAGS "${MPI_COMPILE_FLAGS} " )
6060 endif ()
6161 if (MPI_LINK_FLAGS)
@@ -77,9 +77,9 @@ if(${pfasst_WITH_MPI})
7777endif ()
7878
7979add_custom_target (run_example_advec_all
80- DEPENDS ${all_advec_example_runs}
81- COMMENT "Running all Advection-Diffusion examples" VERBATIM
80+ DEPENDS ${all_advec_example_runs}
81+ COMMENT "Running all Advection-Diffusion examples" VERBATIM
8282)
8383message (STATUS " - run_example_advec_all" )
8484
85- set (all_example_runs ${all_advec_example_runs} PARENT_SCOPE)
85+ set (all_example_runs ${all_example_runs} ${ all_advec_example_runs} PARENT_SCOPE)
Original file line number Diff line number Diff line change 1+ set (all_example_runs ${all_example_runs} )
2+ set (all_scalar_example_runs)
3+
14message (STATUS " scalar" )
25include_directories (
36 ${pfasst_INCLUDES}
@@ -14,3 +17,23 @@ foreach(example ${scalar_examples})
1417 PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} /examples/scalar
1518 )
1619endforeach (example)
20+
21+ message (STATUS " creating make targets to run examples" )
22+ foreach (example ${scalar_examples} )
23+ add_custom_target (run_example_scalar_${example}
24+ COMMAND ${example}
25+ DEPENDS ${example}
26+ WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} /examples/scalar
27+ COMMENT "Running Scalar example: ${example} " VERBATIM
28+ )
29+ list (APPEND all_scalar_example_runs run_example_scalar_${example} )
30+ message (STATUS " - run_example_scalar_${example} " )
31+ endforeach (example)
32+
33+ add_custom_target (run_example_scalar_all
34+ DEPENDS ${all_scalar_example_runs}
35+ COMMENT "Running all Scalar examples" VERBATIM
36+ )
37+ message (STATUS " - run_example_scalar_all" )
38+
39+ set (all_example_runs ${all_example_runs} ${all_scalar_example_runs} PARENT_SCOPE)
You can’t perform that action at this time.
0 commit comments