summaryrefslogtreecommitdiffstats
path: root/Tests/FindPython/VirtualEnvConda/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/FindPython/VirtualEnvConda/CMakeLists.txt')
-rw-r--r--Tests/FindPython/VirtualEnvConda/CMakeLists.txt26
1 files changed, 14 insertions, 12 deletions
diff --git a/Tests/FindPython/VirtualEnvConda/CMakeLists.txt b/Tests/FindPython/VirtualEnvConda/CMakeLists.txt
index 2f7c0db..3a64c31 100644
--- a/Tests/FindPython/VirtualEnvConda/CMakeLists.txt
+++ b/Tests/FindPython/VirtualEnvConda/CMakeLists.txt
@@ -26,21 +26,23 @@ add_test(NAME FindPython3.VirtualEnvDefaultConda
"${CMAKE_COMMAND}" "-DPYTHON3_VIRTUAL_ENV=${Python3_VIRTUAL_ENV}"
-P "${CMAKE_CURRENT_LIST_DIR}/VirtualEnvDefault.cmake")
-add_test(NAME FindPython3.VirtualEnvOnlyConda
- COMMAND "${CMAKE_COMMAND}" -E env --unset=PYTHONHOME
- --unset=VIRTUAL_ENV
- "CONDA_PREFIX=${Python3_VIRTUAL_ENV}"
- "${CMAKE_COMMAND}" "-DPYTHON3_VIRTUAL_ENV=${Python3_VIRTUAL_ENV}"
- -P "${CMAKE_CURRENT_LIST_DIR}/VirtualEnvOnly.cmake")
-add_test(NAME FindPython3.UnsetVirtualEnvOnlyConda
- COMMAND "${CMAKE_COMMAND}" -E env --unset=PYTHONHOME
- --unset=CONDA_PREFIX
- --unset=VIRTUAL_ENV
- "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_LIST_DIR}/VirtualEnvOnly.cmake")
-
add_test(NAME FindPython3.VirtualEnvStandardConda
COMMAND "${CMAKE_COMMAND}" -E env --unset=PYTHONHOME
--unset=VIRTUAL_ENV
"CONDA_PREFIX=${Python3_VIRTUAL_ENV}"
"${CMAKE_COMMAND}" "-DPYTHON3_VIRTUAL_ENV=${Python3_VIRTUAL_ENV}"
-P "${CMAKE_CURRENT_LIST_DIR}/VirtualEnvStandard.cmake")
+
+if(Cmake_TEST_FindPython2)
+ add_test(NAME FindPython3.VirtualEnvOnlyConda
+ COMMAND "${CMAKE_COMMAND}" -E env --unset=PYTHONHOME
+ --unset=VIRTUAL_ENV
+ "CONDA_PREFIX=${Python3_VIRTUAL_ENV}"
+ "${CMAKE_COMMAND}" "-DPYTHON3_VIRTUAL_ENV=${Python3_VIRTUAL_ENV}"
+ -P "${CMAKE_CURRENT_LIST_DIR}/VirtualEnvOnly.cmake")
+ add_test(NAME FindPython3.UnsetVirtualEnvOnlyConda
+ COMMAND "${CMAKE_COMMAND}" -E env --unset=PYTHONHOME
+ --unset=CONDA_PREFIX
+ --unset=VIRTUAL_ENV
+ "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_LIST_DIR}/VirtualEnvOnly.cmake")
+endif()