diff --git a/CMakeLists.txt b/CMakeLists.txt index 28c2db78a72b9dbe6260c1749ce96e28244e1e89..5d3079a3bf0a34234d90e8de0176070fc15bfe79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,11 +21,11 @@ FIND_PACKAGE(OTB) MESSAGE(FATAL_ERROR "OTB not found. Please set OTB_DIR") ENDIF(OTB_FOUND) -OPTION(OTB_USE_CUBLAS "Use Cuda CUBLAS library." OFF) -IF(OTB_USE_CUBLAS) +OPTION(OTB_USE_CUDA "Use Cuda CUBLAS library." OFF) +IF(OTB_USE_CUDA) FIND_PACKAGE(CUDA) INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS}) -ENDIF(OTB_USE_CUBLAS) +ENDIF(OTB_USE_CUDA) INCLUDE_DIRECTORIES( ${Hyperspectral_SOURCE_DIR}/Code/BasicFilters diff --git a/Code/BasicFilters/CMakeLists.txt b/Code/BasicFilters/CMakeLists.txt index 54297795346c792cf088d84d5ba8dcab3b1fb511..f43b2600938aecef0556bd7331738da499c48cfe 100644 --- a/Code/BasicFilters/CMakeLists.txt +++ b/Code/BasicFilters/CMakeLists.txt @@ -1 +1,4 @@ -ADD_SUBDIRECTORY(GPUCuda) +IF(OTB_USE_CUDA) + ADD_SUBDIRECTORY(GPUCuda) +ENDIF(OTB_USE_CUDA) + diff --git a/Code/BasicFilters/GPUCuda/CMakeLists.txt b/Code/BasicFilters/GPUCuda/CMakeLists.txt index 0c8e46cc767ef2e95e0227e9695055e63c184907..5a6f91c09d6e4115a1a8ba5300193f211857246d 100644 --- a/Code/BasicFilters/GPUCuda/CMakeLists.txt +++ b/Code/BasicFilters/GPUCuda/CMakeLists.txt @@ -8,6 +8,6 @@ IF(OTB_LIBRARY_PROPERTIES) SET_TARGET_PROPERTIES(OTBBasicFiltersGPUCuda PROPERTIES ${OTB_LIBRARY_PROPERTIES}) ENDIF(OTB_LIBRARY_PROPERTIES) -IF(OTB_USE_CUBLAS) +IF(OTB_USE_CUDA) CUDA_ADD_CUBLAS_TO_TARGET( OTBBasicFiltersGPUCuda ) -ENDIF(OTB_USE_CUBLAS) +ENDIF(OTB_USE_CUDA) diff --git a/Code/Hyperspectral/CMakeLists.txt b/Code/Hyperspectral/CMakeLists.txt index 54297795346c792cf088d84d5ba8dcab3b1fb511..f43b2600938aecef0556bd7331738da499c48cfe 100644 --- a/Code/Hyperspectral/CMakeLists.txt +++ b/Code/Hyperspectral/CMakeLists.txt @@ -1 +1,4 @@ -ADD_SUBDIRECTORY(GPUCuda) +IF(OTB_USE_CUDA) + ADD_SUBDIRECTORY(GPUCuda) +ENDIF(OTB_USE_CUDA) + diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index 7f26470ee53f96e66aab2ac7eaeb0e515ac0496b..c01138af91c619c599a074d6f820a68d1942bb97 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -287,7 +287,7 @@ ADD_TEST(hyTvVCAImageFilter_AVIRIS ################### ## Cuda ################### -IF( OTB_USE_CUBLAS ) +IF( OTB_USE_CUDA ) SET( otbHyperCublasTests1_SRC otbCublasStreamingStatisticsVectorImageFilter.cxx @@ -340,7 +340,7 @@ ADD_TEST(bfTvCudaFullyConstrainedLeastSquareImageFilter_AVIRIS512_block512 1 # stream size in MB ) -ENDIF( OTB_USE_CUBLAS ) +ENDIF( OTB_USE_CUDA ) ################### ## Anomaly detection