forked from eclipse/xacc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Daniel Claudino <claudinodc@ornl.gov>
- Loading branch information
1 parent
cc69995
commit 8054735
Showing
6 changed files
with
84 additions
and
69 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 |
---|---|---|
@@ -1,3 +1,23 @@ | ||
add_subdirectory(nlopt-optimizers) | ||
add_subdirectory(mlpack) | ||
add_subdirectory(scipy) | ||
if(XACC_BUILD_SCIPY) | ||
execute_process(COMMAND ${Python_EXECUTABLE} -c "import scipy" RESULT_VARIABLE SCIPY_EXISTS) | ||
if(SCIPY_EXISTS EQUAL "1") | ||
# if not, check we have pip | ||
execute_process(COMMAND ${Python_EXECUTABLE} -c "import pip" RESULT_VARIABLE PIP_EXISTS) | ||
|
||
if(PIP_EXISTS EQUAL "0") | ||
# we have pip, so just install scipy | ||
message(STATUS "${BoldGreen}Installing Scipy.${ColorReset}") | ||
execute_process(COMMAND ${Python_EXECUTABLE} -m pip install scipy) | ||
else() | ||
# we dont have pip, so warn the user | ||
message(STATUS "${BoldYellow}Scipy not found, but can't install via pip. Ensure you install scipy module if you would like to use the Scipy optimizer.${ColorReset}") | ||
endif() | ||
else() | ||
message(STATUS "${BoldGreen}Found Scipy.${ColorReset}") | ||
endif() | ||
add_subdirectory(scipy) | ||
else() | ||
message(STATUS "${BoldYellow}XACC will not build the Scipy optimizer. You can turn it on with -DXACC_BUILD_SCIPY=ON${ColorReset}") | ||
endif() |
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