summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Wrappers/Python')
-rw-r--r--Wrappers/Python/CMakeLists.txt52
-rw-r--r--Wrappers/Python/conda-recipe/bld.bat2
2 files changed, 27 insertions, 27 deletions
diff --git a/Wrappers/Python/CMakeLists.txt b/Wrappers/Python/CMakeLists.txt
index 464c916..52f3f39 100644
--- a/Wrappers/Python/CMakeLists.txt
+++ b/Wrappers/Python/CMakeLists.txt
@@ -41,33 +41,33 @@ elseif(UNIX)
endif()
# GPU regularisers
-
-find_package(CUDA)
-if (CUDA_FOUND)
- message("CUDA FOUND")
- set (SETUP_GPU_WRAPPERS "extra_libraries += ['cilregcuda']\n\
-setup( \n\
- name='ccpi', \n\
- description='CCPi Core Imaging Library - Image regularisers GPU',\n\
- version=cil_version,\n\
- cmdclass = {'build_ext': build_ext},\n\
- ext_modules = [Extension('ccpi.filters.gpu_regularisers',\n\
- sources=[ \n\
- os.path.join('.' , 'src', 'gpu_regularisers.pyx' ),\n\
- ],\n\
- include_dirs=extra_include_dirs, \n\
- library_dirs=extra_library_dirs, \n\
- extra_compile_args=extra_compile_args, \n\
- libraries=extra_libraries ), \n\
- ],\n\
- zip_safe = False, \n\
- packages = {'ccpi','ccpi.filters'},\n\
-)")
-else()
- message("CUDA NOT FOUND")
- set(SETUP_GPU_WRAPPERS "#CUDA NOT FOUND")
+if (BUILD_CUDA)
+ find_package(CUDA)
+ if (CUDA_FOUND)
+ message("CUDA FOUND")
+ set (SETUP_GPU_WRAPPERS "extra_libraries += ['cilregcuda']\n\
+ setup( \n\
+ name='ccpi', \n\
+ description='CCPi Core Imaging Library - Image regularisers GPU',\n\
+ version=cil_version,\n\
+ cmdclass = {'build_ext': build_ext},\n\
+ ext_modules = [Extension('ccpi.filters.gpu_regularisers',\n\
+ sources=[ \n\
+ os.path.join('.' , 'src', 'gpu_regularisers.pyx' ),\n\
+ ],\n\
+ include_dirs=extra_include_dirs, \n\
+ library_dirs=extra_library_dirs, \n\
+ extra_compile_args=extra_compile_args, \n\
+ libraries=extra_libraries ), \n\
+ ],\n\
+ zip_safe = False, \n\
+ packages = {'ccpi','ccpi.filters'},\n\
+ )")
+ else()
+ message("CUDA NOT FOUND")
+ set(SETUP_GPU_WRAPPERS "#CUDA NOT FOUND")
+ endif()
endif()
-
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/setup-regularisers.py.in" "${CMAKE_CURRENT_BINARY_DIR}/setup-regularisers.py")
diff --git a/Wrappers/Python/conda-recipe/bld.bat b/Wrappers/Python/conda-recipe/bld.bat
index e58808b..6c84355 100644
--- a/Wrappers/Python/conda-recipe/bld.bat
+++ b/Wrappers/Python/conda-recipe/bld.bat
@@ -10,7 +10,7 @@ ROBOCOPY /E "%RECIPE_DIR%\..\..\..\Core" "%SRC_DIR%\Core"
cd %SRC_DIR%
:: issue cmake to create setup.py
-cmake -G "NMake Makefiles" %RECIPE_DIR%\..\..\..\ -DBUILD_WRAPPERS=ON -DCONDA_BUILD=ON -DCMAKE_BUILD_TYPE="Release" -DLIBRARY_LIB="%CONDA_PREFIX%\lib" -DLIBRARY_INC="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX="%PREFIX%\Library"
+cmake -G "NMake Makefiles" %RECIPE_DIR%\..\..\..\ -DBUILD_PYTHON_WRAPPERS=ON -DCONDA_BUILD=ON -DBUILD_CUDA=OFF -DCMAKE_BUILD_TYPE="Release" -DLIBRARY_LIB="%CONDA_PREFIX%\lib" -DLIBRARY_INC="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX="%PREFIX%\Library"
::%PYTHON% setup-regularisers.py build_ext
::if errorlevel 1 exit 1