rapids_cmake_support_conda_env

New in version v21.06.00.

Establish a target that holds the CONDA include and link directories.

rapids_cmake_support_conda_env( <target_name> [MODIFY_PREFIX_PATH] )

Creates a global interface target called target_name that holds the CONDA include and link directories, when executed.

Also offers the ability to modify CMAKE_PREFIX_PATH to include the following paths based on the current conda environment:

  • PREFIX

  • BUILD_PREFIX

  • CONDA_PREFIX

New in version v23.08.00:

  • PREFIX/targets/<cuda_target_platform>/

MODIFY_PREFIX_PATH

When in a conda build environment the contents of $ENV{PREFIX}, $ENV{PREFIX}/targets/<cuda_target_platform>/, and `$ENV{BUILD_PREFIX} will be inserted to the front of CMAKE_PREFIX_PATH.

When in a conda environment the contents of $ENV{CONDA_PREFIX} will be inserted to the front of CMAKE_PREFIX_PATH.

Result Variables

CMAKE_PREFIX_PATH will be modified when MODIFY_PREFIX_PATH is provided and called from a conda environment.

Result Targets

target_name target will be created only if called from a conda environment.