summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Python/CMakeLists.txt18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/Python/CMakeLists.txt b/src/Python/CMakeLists.txt
index e539eda..b464059 100644
--- a/src/Python/CMakeLists.txt
+++ b/src/Python/CMakeLists.txt
@@ -36,17 +36,11 @@ execute_process(COMMAND "conda" "env" "list"
foreach(line ${ENV_LIST})
string(REGEX MATCHALL "(.+)[*](.+)" match ${line})
if (NOT ${match} EQUAL "")
- string(REPLACE "*" ";" ENV_DIR ${match})
- list (APPEND cc "")
- foreach(conda ${ENV_DIR})
- string(STRIP ${conda} stripped)
- list(APPEND cc ${stripped})
- endforeach()
- list(LENGTH cc Ns)
- if (${Ns} EQUAL 2)
- list(GET cc 0 CONDA_ENVIRONMENT)
- list(GET cc 1 CONDA_ENVIRONMENT_PATH)
- endif()
+ #message("MATCHED " ${CMAKE_MATCH_0})
+ #message("MATCHED " ${CMAKE_MATCH_1})
+ #message("MATCHED " ${CMAKE_MATCH_2})
+ string(STRIP ${CMAKE_MATCH_1} CONDA_ENVIRONMENT)
+ string(STRIP ${CMAKE_MATCH_2} CONDA_ENVIRONMENT_PATH)
endif()
endforeach()
else()
@@ -58,7 +52,7 @@ if (${CONDA_ENVIRONMENT} AND ${CONDA_ENVIRONMENT_PATH})
else()
message("**********************************************************")
message("Using current conda environmnet " ${CONDA_ENVIRONMENT})
- message("Using current conda environmnet path" ${CONDA_ENVIRONMENT_PATH})
+ message("Using current conda environmnet path " ${CONDA_ENVIRONMENT_PATH})
endif()