forked from cyang-kth/fmm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
if(DEFINED ENV{CONDA_PREFIX}) | ||
set(CONDA_PREFIX $ENV{CONDA_PREFIX} CACHE PATH "") | ||
else() | ||
# Assuming the active conda environment is on PATH, this finds the path of bin/ in the environment | ||
find_program(CONDA_EXECUTABLE conda | ||
PATHS ${CONDA_PREFIX}/bin ${CONDA_PREFIX}/Scripts ENV PATH | ||
) | ||
if(CONDA_EXECUTABLE) | ||
execute_process(COMMAND ${CONDA_EXECUTABLE} info --root | ||
OUTPUT_VARIABLE out_var | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
execute_process(COMMAND ${CONDA_EXECUTABLE} info --envs | ||
) | ||
else() | ||
message(STATUS "\nNo conda environment found in PATH!\nPATH=$ENV{PATH}\n") | ||
endif() | ||
set(CONDA_PREFIX ${out_var}) | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(Conda | ||
REQUIRED_VARS CONDA_PREFIX | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters