#Specify the version being used aswell as the language cmake_minimum_required(VERSION 3.19) #Name your project here project(bimsim) #set the module directory set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}") #set up CUDA find_package(CUDA) #find OpenCV #find_package(OpenCV REQUIRED ) find_package(Boost REQUIRED) #find the STIM library find_package(STIM) #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}") SET( LIBRARY_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIRECTORY}") SET( LIBRARY_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIRECTORY}") add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_SCL_SECURE_NO_WARNINGS) endif ( MSVC ) #MAYBE REMOVE----------------- #set C++11 flags if using GCC if( CMAKE_COMPILER_IS_GNUCC ) SET( CMAKE_CXX_FLAGS "-std=c++11") # SET( CUDA_NVCC_FLAGS "-std=c++11") endif( CMAKE_COMPILER_IS_GNUCC ) #----------------------------- #set the include directories include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${STIM_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ) #SET(CUDA_NVCC_FLAGS_RELEASE ${CUDA_NVCC_FLAGS};/maxregcount=60) #create an executable cuda_add_executable(bimsim bimsim.cu sources.h ) #set the link libraries target_link_libraries(bimsim ${CUDA_cufft_LIBRARY} ${CUDA_cublas_LIBRARY} ${OpenCV_LIBS} )