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>2018-01-19 14:26:06 +0000
commit36c81e4aaac23edee0ecfd97762e3c91d0d67f90 (patch)
treeb8c1270a3e8a33005ba7c3f94e4508c7a000b1df /src/Python
parent42ebac43aca279c5e6e9ba7fe8946e69ccc53c09 (diff)
downloadregularization-36c81e4aaac23edee0ecfd97762e3c91d0d67f90.tar.gz
regularization-36c81e4aaac23edee0ecfd97762e3c91d0d67f90.tar.bz2
regularization-36c81e4aaac23edee0ecfd97762e3c91d0d67f90.tar.xz
regularization-36c81e4aaac23edee0ecfd97762e3c91d0d67f90.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()