2022-01-20 11:44:00 +00:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
2020-05-27 15:26:52 +00:00
|
|
|
|
|
|
|
project(OpenCLVectorAdd)
|
|
|
|
|
2022-01-20 11:42:51 +00:00
|
|
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
|
2020-05-27 15:26:52 +00:00
|
|
|
find_package(OpenCL REQUIRED)
|
|
|
|
|
|
|
|
add_executable(OpenCLVectorAdd OpenCLVectorAdd.cpp)
|
|
|
|
|
2022-07-17 11:41:40 +00:00
|
|
|
add_library(TracyClient STATIC ../../public/TracyClient.cpp
|
|
|
|
../../public/tracy/TracyOpenCL.hpp)
|
|
|
|
target_include_directories(TracyClient PUBLIC ../../public/tracy)
|
2020-05-27 15:26:52 +00:00
|
|
|
target_compile_definitions(TracyClient PUBLIC TRACY_ENABLE=1)
|
|
|
|
|
2022-01-20 11:42:51 +00:00
|
|
|
target_link_libraries(OpenCLVectorAdd PUBLIC OpenCL::OpenCL TracyClient ${CMAKE_DL_LIBS} Threads::Threads)
|