URI:
       tCMakeLists.txt - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
  HTML git clone git://src.adamsgaard.dk/sphere
   DIR Log
   DIR Files
   DIR Refs
   DIR LICENSE
       ---
       tCMakeLists.txt (2679B)
       ---
            1 # Link with libcutil (expected to be in ${CUDA_SDK_ROOT_DIR}/C/lib)
            2 #LINK_LIBRARIES("-L${CUDA_SDK_ROOT_DIR}/lib -lcutil")        # For 32 bit systems
            3 #LINK_LIBRARIES("-L${CUDA_SDK_ROOT_DIR}/lib -lcutil_x86_64") # For 64 bit systems
            4 
            5 # Ohter folders to include
            6 #SET(CUDA_SDK_ROOT_DIR "/usr/local/cuda-5.0/samples")
            7 INCLUDE_DIRECTORIES("${CUDA_SDK_ROOT_DIR}/common/inc")
            8 INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}/src")
            9 SET(EXECUTABLE_OUTPUT_PATH "../")
           10 
           11 # Include FindCUDA script
           12 INCLUDE(FindCUDA)
           13 
           14 # Additional NVCC command line arguments
           15 # NOTE: Multiple arguments must be semi-colon selimited
           16 IF (GPU_GENERATION EQUAL 2) # Ampere
           17     SET(CUDA_NVCC_FLAGS
           18         "--use_fast_math;-O3;-gencode=arch=compute_80,code=\"sm_80,compute_80\";--fmad=false -ccbin gcc")
           19 ELSEIF (GPU_GENERATION EQUAL 1) # Kepler
           20     SET(CUDA_NVCC_FLAGS
           21         "--use_fast_math;-O3;-gencode=arch=compute_35,code=\"sm_35,compute_35\";--fmad=false -ccbin gcc")
           22         #"--use_fast_math;-O3;-gencode=arch=compute_35,code=\"sm_35,compute_35\";--fmad=false -ccbin gcc-8.3")
           23         #"--use_fast_math;-O3;-gencode=arch=compute_35,code=\"sm_35,compute_35\";--fmad=false -ccbin gcc-4.6")
           24         #"--use_fast_math;-O3;-gencode=arch=compute_35,code=\"sm_35,compute_35\";--fmad=false -ccbin gcc;-Xcompiler -fPIC")
           25         #"--use_fast_math;-O3;-gencode=arch=compute_35,code=\"sm_35,compute_35\";--fmad=false;-ccbin clang-3.8")
           26 ELSE()  # Fermi
           27     SET(CUDA_NVCC_FLAGS
           28         "--use_fast_math;-O3;-gencode=arch=compute_20,code=\"sm_20,compute_20\";--fmad=false -ccbin gcc")
           29         #"--use_fast_math;-O3;-gencode=arch=compute_20,code=\"sm_20,compute_20\";--fmad=false -ccbin gcc-8.3")
           30         #"--use_fast_math;-O3;-gencode=arch=compute_20,code=\"sm_20,compute_20\";--fmad=false -ccbin gcc;-Xcompiler -fPIC")
           31         #"--use_fast_math;-O3;-gencode=arch=compute_20,code=\"sm_20,compute_20\";--fmad=false;-ccbin clang-3.8")
           32 ENDIF ()
           33 
           34 SET(CMAKE_CXX_FLAGS "-fPIC ${CMAKE_CXX_FLAGS}")
           35 
           36 # Rule to build executable program
           37 CUDA_ADD_EXECUTABLE(sphere
           38     main.cpp file_io.cpp sphere.cpp device.cu utility.cu utility.cpp
           39     navierstokes.cpp darcy.cpp)
           40 CUDA_ADD_EXECUTABLE(porosity
           41     porosity.cpp file_io.cpp sphere.cpp device.cu utility.cu utility.cpp
           42     navierstokes.cpp darcy.cpp)
           43 CUDA_ADD_EXECUTABLE(forcechains
           44     forcechains.cpp file_io.cpp sphere.cpp device.cu utility.cu utility.cpp
           45     navierstokes.cpp darcy.cpp)
           46 
           47 #ADD_EXECUTABLE(unittests boost-unit-tests.cpp sphere.cpp)
           48 #TARGET_LINK_LIBRARIES(unittests
           49 #                      ${Boost_FILESYSTEM_LIBRARY}
           50 #                      ${Boost_SYSTEM_LIBRARY}
           51 #                      ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
           52 
           53 ADD_EXECUTABLE(sphere_status sphere_status.c)