diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 28bbe937..0834853a 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -130,18 +130,17 @@ macro(add_sample) ) foreach(CONFIG ${OPENCL_SAMPLE_CONFIGS}) - install(TARGETS ${OPENCL_SAMPLE_TARGET} CONFIGURATIONS ${CONFIG} DESTINATION ${CMAKE_INSTALL_BINDIR}/${CONFIG}) - install(FILES ${OPENCL_SAMPLE_KERNELS} CONFIGURATIONS ${CONFIG} DESTINATION ${CMAKE_INSTALL_BINDIR}/${CONFIG}) - install(FILES ${OPENCL_SAMPLE_SHADERS} CONFIGURATIONS ${CONFIG} DESTINATION ${CMAKE_INSTALL_BINDIR}/${CONFIG}) - if(OPENCL_SDK_TEST_SAMPLES AND OPENCL_SAMPLE_TEST) - add_test( - NAME "${OPENCL_SAMPLE_TARGET}_${CONFIG}" - COMMAND ${OPENCL_SAMPLE_TARGET} - CONFIGURATIONS ${CONFIG} - WORKING_DIRECTORY "$" - ) - endif() + install(TARGETS ${OPENCL_SAMPLE_TARGET} CONFIGURATIONS ${CONFIG} DESTINATION ${CMAKE_INSTALL_BINDIR}) + install(FILES ${OPENCL_SAMPLE_KERNELS} CONFIGURATIONS ${CONFIG} DESTINATION ${CMAKE_INSTALL_BINDIR}) + install(FILES ${OPENCL_SAMPLE_SHADERS} CONFIGURATIONS ${CONFIG} DESTINATION ${CMAKE_INSTALL_BINDIR}) endforeach() + if(OPENCL_SDK_TEST_SAMPLES AND OPENCL_SAMPLE_TEST) + add_test( + NAME ${OPENCL_SAMPLE_TARGET} + COMMAND ${OPENCL_SAMPLE_TARGET} + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + ) + endif() endmacro()