summaryrefslogtreecommitdiffstats
path: root/src/Python
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2017-10-27 12:43:24 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2017-10-27 12:43:24 +0100
commit6ed4ddcfd133085688b53ad17fd7f595b49cd60d (patch)
treee72f1674802815d65f9c776db9f8603871e987d8 /src/Python
parenta9ee40156a7ad6ae4fcb9e07aea99914f6c7f7ff (diff)
downloadregularization-6ed4ddcfd133085688b53ad17fd7f595b49cd60d.tar.gz
regularization-6ed4ddcfd133085688b53ad17fd7f595b49cd60d.tar.bz2
regularization-6ed4ddcfd133085688b53ad17fd7f595b49cd60d.tar.xz
regularization-6ed4ddcfd133085688b53ad17fd7f595b49cd60d.zip
Finds the conda executable
Diffstat (limited to 'src/Python')
-rw-r--r--src/Python/CMakeLists.txt4
-rw-r--r--src/Python/FindAnacondaEnvironment.cmake7
2 files changed, 8 insertions, 3 deletions
diff --git a/src/Python/CMakeLists.txt b/src/Python/CMakeLists.txt
index 1b73380..aecc2ee 100644
--- a/src/Python/CMakeLists.txt
+++ b/src/Python/CMakeLists.txt
@@ -158,13 +158,13 @@ add_custom_target(regularizers
)
add_custom_target(install-fista
- COMMAND conda
+ COMMAND ${CONDA_EXECUTABLE}
install --force --use-local ccpi-fista=${CIL_VERSION} -c ccpi -c conda-forge
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
add_custom_target(install-regularizers
- COMMAND conda
+ COMMAND ${CONDA_EXECUTABLE}
install --force --use-local ccpi-regularizers=${CIL_VERSION} -c ccpi -c conda-forge
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
diff --git a/src/Python/FindAnacondaEnvironment.cmake b/src/Python/FindAnacondaEnvironment.cmake
index fa4637a..6475128 100644
--- a/src/Python/FindAnacondaEnvironment.cmake
+++ b/src/Python/FindAnacondaEnvironment.cmake
@@ -97,7 +97,12 @@ function (findPythonForAnacondaEnvironment env)
set (PYTHON_VERSION_MINOR ${_PYTHON_VERSION_MINOR} PARENT_SCOPE)
set (PYTHON_VERSION_PATCH ${_PYTHON_VERSION_PATCH} PARENT_SCOPE)
message("My version found " ${PYTHON_VERSION_STRING})
-
+ ## find conda executable
+ if (WIN32)
+ set (CONDA_EXECUTABLE ${env}/Script/conda PARENT_SCOPE)
+ elseif(UNIX)
+ set (CONDA_EXECUTABLE ${env}/bin/conda PARENT_SCOPE)
+ endif()
endfunction()