Skip to content

Commit

Permalink
Revert per-config samples install directories (#113)
Browse files Browse the repository at this point in the history
* Revert install tree modifications

This reverts the changes made on #88 that modified the install location
of the samples

* Make vendors path not depend on hard-coded POCL install path
  • Loading branch information
Beanavil authored Oct 11, 2024
1 parent dbcae2c commit 252898e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,8 @@ jobs:
if [[ "${{matrix.GEN}}" == "Ninja Multi-Config" && ! `which ninja` ]]; then brew install ninja; fi &&
# We need to provide an OpenCL driver for Intel CPU on mac
brew install pocl
echo "OCL_ICD_VENDORS=/opt/homebrew/Cellar/pocl/6.0/etc/OpenCL/vendors" >> $GITHUB_ENV
POCL_INSTALL_PATH=$(brew --prefix pocl)
echo "OCL_ICD_VENDORS=$POCL_INSTALL_PATH/etc/OpenCL/vendors" >> $GITHUB_ENV
cmake --version
- name: Install dependencies (Homebrew)
Expand Down
21 changes: 10 additions & 11 deletions samples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$<TARGET_FILE_DIR:${OPENCL_SAMPLE_TARGET}>"
)
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()


Expand Down

0 comments on commit 252898e

Please sign in to comment.