The kernel in the .cl file is also compiled by the native C++ cpu compiler, when using MiniCL. When you want to debug the kernel using MiniCL, and want to put breakpoints, it is best to: 1) enabled the define #define DEBUG_MINICL_KERNELS 1 in Bullet/src/BulletMultiThreaded/MiniCL.cpp 2) temporarily remove the stringify lines in the .cl kernel, because it prevents the debugger from finding the right line.
31 lines
671 B
CMake
31 lines
671 B
CMake
# AppMiniCLVectorAdd is a very basic test for MiniCL.
|
|
|
|
|
|
ADD_DEFINITIONS(-DUSE_MINICL)
|
|
|
|
INCLUDE_DIRECTORIES(
|
|
${BULLET_PHYSICS_SOURCE_DIR}/src
|
|
)
|
|
|
|
LINK_LIBRARIES(
|
|
BulletMultiThreaded LinearMath
|
|
)
|
|
|
|
ADD_EXECUTABLE(AppVectorAdd_Mini
|
|
../MiniCL_VectorAdd.cpp
|
|
../VectorAddKernels.cl
|
|
)
|
|
|
|
IF (UNIX)
|
|
TARGET_LINK_LIBRARIES(AppVectorAdd_Mini pthread)
|
|
ENDIF(UNIX)
|
|
|
|
|
|
IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
|
|
ADD_CUSTOM_COMMAND(
|
|
TARGET AppVectorAdd_Mini
|
|
POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/VectorAdd_OpenCL/VectorAddKernels.cl ${CMAKE_CURRENT_BINARY_DIR}
|
|
)
|
|
ENDIF()
|
|
|