File: CMakeLists.txt

package info (click to toggle)
actor-framework 0.17.6-3.2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 9,008 kB
  • sloc: cpp: 77,684; sh: 674; python: 309; makefile: 13
file content (25 lines) | stat: -rw-r--r-- 757 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
cmake_minimum_required(VERSION 3.5)
project(caf_examples_opencl CXX)

if(OpenCL_LIBRARIES AND NOT CAF_NO_EXAMPLES)
  add_custom_target(opencl_examples)
  include_directories(${CAF_INCLUDE_DIRS})
  if(${CMAKE_SYSTEM_NAME} MATCHES "Window")
    set(WSLIB -lws2_32)
  else()
    set(WSLIB)
  endif()
  macro(add name folder)
    add_executable(${name} ${folder}/${name}.cpp ${ARGN})
    target_link_libraries(${name}
                          ${CAF_EXTRA_LDFLAGS}
                          ${CAF_LIBRARIES}
                          ${PTHREAD_LIBRARIES}
                          ${WSLIB}
                          ${OpenCL_LIBRARIES})
    add_dependencies(${name} all_examples)
  endmacro()
  add(proper_matrix .)
  add(simple_matrix .)
  add(scan .)
endif()