From 36c81e4aaac23edee0ecfd97762e3c91d0d67f90 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 27 Oct 2017 12:43:24 +0100 Subject: Finds the conda executable --- src/Python/CMakeLists.txt | 4 ++-- src/Python/FindAnacondaEnvironment.cmake | 7 ++++++- 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() -- cgit v1.2.3