-
Notifications
You must be signed in to change notification settings - Fork 21
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
8 changed files
with
75 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#***************************************************************************** | ||
# FindMatplotlib | ||
# | ||
# Check if matplotlib is installed and configure c-api includes | ||
# | ||
# This module defines | ||
# Matplotlib_FOUND, set TRUE if matplotlib and c-api are available | ||
# Matplotlib_VERSION, matplotlib release version | ||
|
||
set(_TMP_PY_OUTPUT) | ||
set(_TMP_PY_RETURN) | ||
exec_program("${PYTHON_EXECUTABLE}" | ||
ARGS "-c 'import matplotlib; print(matplotlib.__version__)'" | ||
OUTPUT_VARIABLE _TMP_PY_OUTPUT | ||
RETURN_VALUE _TMP_PY_RETURN) | ||
set(Matplotlib_VERSION_FOUND FALSE) | ||
if(NOT _TMP_PY_RETURN) | ||
set(Matplotlib_VERSION_FOUND TRUE) | ||
else() | ||
set(_TMP_PY_OUTPUT) | ||
endif() | ||
set(Matplotlib_VERSION "${_TMP_PY_OUTPUT}") | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(Matplotlib DEFAULT_MSG Matplotlib_VERSION_FOUND) |
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,25 @@ | ||
#***************************************************************************** | ||
# FindPyTorch | ||
# | ||
# Check if torch is installed and configure c-api includes | ||
# | ||
# This module defines | ||
# PyTorch_FOUND, set TRUE if torch and c-api are available | ||
# PyTorch_VERSION, torch release version | ||
|
||
set(_TMP_PY_OUTPUT) | ||
set(_TMP_PY_RETURN) | ||
exec_program("${PYTHON_EXECUTABLE}" | ||
ARGS "-c 'import torch; print(torch.__version__)'" | ||
OUTPUT_VARIABLE _TMP_PY_OUTPUT | ||
RETURN_VALUE _TMP_PY_RETURN) | ||
set(PyTorch_VERSION_FOUND FALSE) | ||
if(NOT _TMP_PY_RETURN) | ||
set(PyTorch_VERSION_FOUND TRUE) | ||
else() | ||
set(_TMP_PY_OUTPUT) | ||
endif() | ||
set(PyTorch_VERSION "${_TMP_PY_OUTPUT}") | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(PyTorch DEFAULT_MSG PyTorch_VERSION_FOUND) |
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
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
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