Commit 61b673a8 authored by Marc Modat's avatar Marc Modat

benchamark added but modifications are still needed

parent 60350f20
......@@ -23,14 +23,13 @@ ENDIF(WIN32)
#-----------------------------------------------------------------------------
OPTION(BUILD_ALADIN "To build the reg_aladin executable" ON)
OPTION(BUILD_BENCHMARK "To build the reg_benchmark executable" OFF)
OPTION(BUILD_F3D "To build the reg_f3d executable" ON)
OPTION(BUILD_RESAMPLE "To build the reg_resample executable" ON)
OPTION(BUILD_TOOLS "To build the reg_tools executable" ON)
OPTION(USE_VERBOSE "To print out extra information" OFF)
OPTION(USE_SSE "to use SSE computation in some case" OFF)
OPTION(USE_CUDA "Use CUDA for a GPU implementation of the code" OFF)
#-----------------------------------------------------------------------------
......@@ -59,11 +58,25 @@ ENDIF(USE_CUDA)
#-----------------------------------------------------------------------------
IF(BUILD_BENCHMARK)
IF(NOT USE_CUDA)
MESSAGE(FATAL_ERROR "USE_CUDA is needed to build reg_benchmark. Exit")
ENDIF(NOT USE_CUDA)
IF(NOT BUILD_F3D)
MESSAGE(FATAL_ERROR "BUILD_F3D is needed to build reg_benchmark. Exit")
ENDIF(NOT BUILD_F3D)
IF(NOT BUILD_ALADIN)
MESSAGE(FATAL_ERROR "BUILD_ALADIN is needed to build reg_benchmark. Exit")
ENDIF(NOT BUILD_ALADIN)
ENDIF(BUILD_BENCHMARK)
#-----------------------------------------------------------------------------
SUBDIRS(nifti)
SUBDIRS(reg-lib)
SUBDIRS(reg-apps)
IF(USE_CUDA)
SUBDIRS(reg-lib_gpu)
ENDIF(USE_CUDA)
SUBDIRS(reg-apps)
#-----------------------------------------------------------------------------
......@@ -36,3 +36,9 @@ IF(BUILD_ALADIN)
ENDIF(BUILD_F3D)
ENDIF(BUILD_ALADIN)
#-----------------------------------------------------------------------------
IF(BUILD_BENCHMARK)
CUDA_ADD_EXECUTABLE(reg_benchmark reg_benchmark.cpp)
TARGET_LINK_LIBRARIES(reg_benchmark _reg_resampling _reg_bspline _reg_mutualinformation _reg_ssd _reg_affineTransformation _reg_blockMatching _reg_tools ${ZLIB} reg_nifti _reg_resampling_gpu _reg_bspline_gpu _reg_mutualinformation_gpu _reg_affineTransformation_gpu _reg_blockMatching_gpu _reg_tools_gpu _reg_cudaCommon)
INSTALL_TARGETS(/bin reg_benchmark)
ENDIF(BUILD_BENCHMARK)
#-----------------------------------------------------------------------------
\ No newline at end of file
PROJECT(nifty_reg_divers)
cmake_minimum_required(VERSION 2.6)
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" MATCHES "^2\\.6$")
MARK_AS_ADVANCED(FORCE CMAKE_BACKWARDS_COMPATIBILITY)
ELSE("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" MATCHES "^2\\.6$")
MARK_AS_ADVANCED(CLEAR CMAKE_BACKWARDS_COMPATIBILITY)
ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" MATCHES "^2\\.6$")
#-----------------------------------------------------------------------------
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
#-----------------------------------------------------------------------------
IF(WIN32)
SET(ZLIB "zlib")
ELSE(WIN32)
SET(ZLIB "z")
ENDIF(WIN32)
#-----------------------------------------------------------------------------
OPTION(BUILD_BENCHMARK "To build the reg_benchmark executable" ON)
#-----------------------------------------------------------------------------
SET(BUILD_F3D "ON")
SET(BUILD_ALADIN "ON")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/../nifti)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/../reg-lib)
#-----------------------------------------------------------------------------
ADD_DEFINITIONS(-D_VERBOSE)
ADD_DEFINITIONS(-D_USE_SSE)
INCLUDE(${CMAKE_SOURCE_DIR}/../CMake/cuda/FindCUDA.cmake)
ADD_DEFINITIONS(-D_USE_CUDA)
SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-D_USE_CUDA")
INCLUDE_DIRECTORIES(${CUDA_CUT_INCLUDE_DIR})
CUDA_INCLUDE_DIRECTORIES(${CUDA_CUT_INCLUDE_DIR})
CUDA_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/../nifti)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/../reg-lib_gpu)
#-----------------------------------------------------------------------------
SUBDIRS(../nifti)
SUBDIRS(../reg-lib)
SUBDIRS(../reg-lib_gpu)
#-----------------------------------------------------------------------------
IF(BUILD_BENCHMARK)
CUDA_ADD_EXECUTABLE(reg_benchmark reg_benchmark.cpp)
TARGET_LINK_LIBRARIES(reg_benchmark _reg_resampling _reg_bspline _reg_mutualinformation _reg_ssd _reg_affineTransformation _reg_blockMatching _reg_tools ${ZLIB} reg_nifti _reg_resampling_gpu _reg_bspline_gpu _reg_mutualinformation_gpu _reg_affineTransformation_gpu _reg_blockMatching_gpu _reg_tools_gpu _reg_cudaCommon)
INSTALL_TARGETS(/bin reg_benchmark)
ENDIF(BUILD_BENCHMARK)
#-----------------------------------------------------------------------------
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment