Skip to content
Snippets Groups Projects
CMakeLists.txt 600 B
Newer Older
  • Learn to ignore specific revisions
  • 数学の武士's avatar
    数学の武士 committed
    cmake_minimum_required(VERSION 3.0)
    
    enable_language(CXX)
    set(CMAKE_CXX_STANDARD 11)
    
    option(INCLUDE_CUDA "GPU build in mode"    OFF)
    project(MemoryProcessing)
    
    if(INCLUDE_CUDA)
        enable_language(CUDA)
        find_package(CUDA REQUIRED)
        include_directories(${CUDA_INCLUDE_DIRS})
    
        # -DCMAKE_CUDA_ARCHITECTURES=native -- Compile for the architecture(s) of the host's GPU(s)
    endif(INCLUDE_CUDA)
    
    set(SOURCES_CXX 
        src/MemoryProcessing.cpp
        )
    if(INCLUDE_CUDA)
        set(SOURCES_CU 
        src/MemoryProcessing.cu
        )
    endif(INCLUDE_CUDA)
    
    add_library(memproc STATIC ${SOURCES_CU} ${SOURCES_CXX})