From f2bcb4a10b3557528c72a64312b246db1da0a68d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <klinkovsky@mmg.fjfi.cvut.cz> Date: Sat, 8 Jan 2022 10:59:06 +0100 Subject: [PATCH] Fixed CMakeLists.txt for documentation examples --- Documentation/Examples/Algorithms/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Documentation/Examples/Algorithms/CMakeLists.txt b/Documentation/Examples/Algorithms/CMakeLists.txt index a2fc4569da..c0a324a831 100644 --- a/Documentation/Examples/Algorithms/CMakeLists.txt +++ b/Documentation/Examples/Algorithms/CMakeLists.txt @@ -12,6 +12,7 @@ set( HOST_EXAMPLES staticForExample unrolledForExample ) + if( BUILD_CUDA ) foreach( target IN ITEMS ${COMMON_EXAMPLES} ) cuda_add_executable( ${target}-cuda ${target}.cu OPTIONS ) @@ -19,15 +20,21 @@ if( BUILD_CUDA ) set( CUDA_OUTPUTS ${CUDA_OUTPUTS} ${target}.out ) endforeach() else() - foreach( target IN ITEMS ${COMMON_EXAMPLES} ${HOST_EXAMPLES}) + foreach( target IN ITEMS ${COMMON_EXAMPLES} ) add_executable( ${target} ${target}.cpp ) add_custom_command( COMMAND ${target} > ${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/${target}.out OUTPUT ${target}.out ) set( HOST_OUTPUTS ${HOST_OUTPUTS} ${target}.out ) endforeach() endif() +foreach( target IN ITEMS ${HOST_EXAMPLES} ) + add_executable( ${target} ${target}.cpp ) + add_custom_command( COMMAND ${target} > ${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/${target}.out OUTPUT ${target}.out ) + set( HOST_OUTPUTS ${HOST_OUTPUTS} ${target}.out ) +endforeach() + IF( BUILD_CUDA ) ADD_CUSTOM_TARGET( RunAlgorithmsExamples-cuda ALL DEPENDS ${CUDA_OUTPUTS} ) ELSE() ADD_CUSTOM_TARGET( RunAlgorithmsExamples ALL DEPENDS ${HOST_OUTPUTS} ) -ENDIF() \ No newline at end of file +ENDIF() -- GitLab