Blame view

cpp/CMakeLists.txt 1.53 KB
c9aba18a   Laila Saadatifard   ivote3 on the GPU...
1
2
3
4
5
6
7
8
9
10
11
12
  #Specify the version being used aswell as the language
  cmake_minimum_required(VERSION 2.8.11)
  
  #Name your project here
  project(ivote3)
  
  #set the module directory
  set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}")
  
  #set up CUDA
  find_package(CUDA REQUIRED)
  
a744d027   Laila Saadatifard   upload the ivote3...
13
14
15
  #set up opencv
  find_package(opencv)
  
c9aba18a   Laila Saadatifard   ivote3 on the GPU...
16
17
18
19
20
21
22
23
24
  #find the STIM library
  find_package(STIM REQUIRED)
  
  #find the pthreads package
  find_package(Threads)
  
  #find the X11 package
  find_package(X11)
  
305d252c   David Mayerich   Win32 fixes, resu...
25
26
27
28
29
30
  #build the executable in the binary directory on MS Visual Studio
  if ( MSVC )
  	SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIRECTORY}")
  	SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIRECTORY}")
  endif ( MSVC )
  
c9aba18a   Laila Saadatifard   ivote3 on the GPU...
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
  include_directories(
  					${STIM_INCLUDE_DIRS}
  					)
  
  #Assign source files to the appropriate variables
  file(GLOB SRC_CPP "*.cpp")
  file(GLOB SRC_H "*.h")
  file(GLOB SRC_CU "*.cu")
  file(GLOB SRC_CUH "*.cuh")
  
  #create an executable file
  cuda_add_executable(ivote3
  				${SRC_H} 
  				${SRC_CPP} 
  				${SRC_CU} 
  				${SRC_CUH} 
  				)
  
  #set the link libraries
  target_link_libraries(ivote3
  						#${CUDA_cufft_LIBRARY}
  						#${CUDA_cublas_LIBRARY}
  						${CMAKE_THREAD_LIBS_INIT}
  						${X11_LIBRARIES}
  		  )
  
  #copy an image test case
305d252c   David Mayerich   Win32 fixes, resu...
58
59
60
  configure_file(nissl-raw-data/nissl-float-256.256.256.vol ${CMAKE_CURRENT_BINARY_DIR}/nissl-float-256.256.256.vol @ONLY)
  configure_file(nissl-raw-data/nissl-float-128.128.128.vol ${CMAKE_CURRENT_BINARY_DIR}/nissl-float-128.128.128.vol @ONLY)
  configure_file(nissl-raw-data/nissl-float-64.64.64.vol ${CMAKE_CURRENT_BINARY_DIR}/nissl-float-64.64.64.vol @ONLY)