Skip to content
Snippets Groups Projects
Commit 501b1942 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Documentation: fixed mpirun commands in CMakeLists.txt

parent 4ec0dcbe
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,9 @@ if( BUILD_CUDA ) ...@@ -21,7 +21,9 @@ if( BUILD_CUDA )
if( ${BUILD_MPI} ) if( ${BUILD_MPI} )
foreach( target IN ITEMS ${MPI_COMMON_EXAMPLES} ) foreach( target IN ITEMS ${MPI_COMMON_EXAMPLES} )
cuda_add_executable( ${target}-cuda ${target}.cu OPTIONS ) cuda_add_executable( ${target}-cuda ${target}.cu OPTIONS )
add_custom_command( COMMAND "mpirun" ${mpirun_parameters} ${target}-cuda > ${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/${target}.out OUTPUT ${target}.out ) add_custom_command( COMMAND "mpirun" ${mpirun_parameters} "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target}-cuda${CMAKE_EXECUTABLE_SUFFIX}" > ${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/${target}.out
DEPENDS ${target}-cuda
OUTPUT ${target}.out )
set( CUDA_OUTPUTS ${CUDA_OUTPUTS} ${target}.out ) set( CUDA_OUTPUTS ${CUDA_OUTPUTS} ${target}.out )
endforeach() endforeach()
endif() endif()
...@@ -34,7 +36,9 @@ else() ...@@ -34,7 +36,9 @@ else()
if( ${BUILD_MPI} ) if( ${BUILD_MPI} )
foreach( target IN ITEMS ${MPI_COMMON_EXAMPLES} ) foreach( target IN ITEMS ${MPI_COMMON_EXAMPLES} )
add_executable( ${target} ${target}.cpp ) add_executable( ${target} ${target}.cpp )
add_custom_command( COMMAND "mpirun" ${mpirun_parameters} ${target} > ${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/${target}.out OUTPUT ${target}.out ) add_custom_command( COMMAND "mpirun" ${mpirun_parameters} "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target}${CMAKE_EXECUTABLE_SUFFIX}" > ${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/${target}.out
DEPENDS ${target}
OUTPUT ${target}.out )
set( HOST_OUTPUTS ${HOST_OUTPUTS} ${target}.out ) set( HOST_OUTPUTS ${HOST_OUTPUTS} ${target}.out )
endforeach() endforeach()
endif() endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment