diff options
author | Sebastian Müller <gsenpo@gmail.com> | 2019-12-20 12:24:54 (GMT) |
---|---|---|
committer | Sebastian Müller <gsenpo@gmail.com> | 2019-12-21 14:38:00 (GMT) |
commit | 776d27d4a4eb27f5618e682dafc1d44fba8598c6 (patch) | |
tree | 671560defc90f6bec639982692c36dbe5cbebca7 /Tests/FindPython/VirtualEnvConda/VirtualEnvStandard.cmake | |
parent | 9f75f9974f974611ab899675aa7bb987078e3b0d (diff) | |
download | CMake-776d27d4a4eb27f5618e682dafc1d44fba8598c6.zip CMake-776d27d4a4eb27f5618e682dafc1d44fba8598c6.tar.gz CMake-776d27d4a4eb27f5618e682dafc1d44fba8598c6.tar.bz2 |
FindPython: Extend virtual environment handling by considering conda
- Add functionality to recognize and use CONDA_PREFIX environment variable
- Add tests for conda virtual environments
- Fixes: #20111
Diffstat (limited to 'Tests/FindPython/VirtualEnvConda/VirtualEnvStandard.cmake')
-rw-r--r-- | Tests/FindPython/VirtualEnvConda/VirtualEnvStandard.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/FindPython/VirtualEnvConda/VirtualEnvStandard.cmake b/Tests/FindPython/VirtualEnvConda/VirtualEnvStandard.cmake new file mode 100644 index 0000000..89f27d8 --- /dev/null +++ b/Tests/FindPython/VirtualEnvConda/VirtualEnvStandard.cmake @@ -0,0 +1,7 @@ + +set (Python3_FIND_VIRTUALENV STANDARD) +find_package (Python3 REQUIRED) + +if (Python3_EXECUTABLE MATCHES "^${PYTHON3_VIRTUAL_ENV}/.+") + message (FATAL_ERROR "Python3 virtual env unexpectedly found.") +endif() |