Conda: Add CONDA_PREFIX as an acceptable system prefix path

This commit is contained in:
Robert Maynard 2020-05-12 16:51:23 -04:00 committed by Brad King
parent cd9c3c000f
commit 50879ce412
2 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,9 @@ Darwin:
OpenBSD:
* ``ENV{LOCALBASE}``
Unix:
* ``ENV{CONDA_PREFIX}`` when using a conda compiler
Windows:
* ``ENV{ProgramW6432}``
* ``ENV{ProgramFiles}``

View File

@ -95,6 +95,10 @@ unset(_cmake_sysroot_compile)
# synchronized
if(CMAKE_COMPILER_SYSROOT)
list(PREPEND CMAKE_SYSTEM_PREFIX_PATH "${CMAKE_COMPILER_SYSROOT}")
if(DEFINED ENV{CONDA_PREFIX} AND EXISTS "$ENV{CONDA_PREFIX}")
list(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{CONDA_PREFIX}")
endif()
endif()
# Enable use of lib32 and lib64 search path variants by default.