Add PYSCF_BIN variable to guard afqmc workflow tests.

This commit is contained in:
Fionn Malone 2019-09-11 11:30:58 -07:00
parent e38ee1422b
commit d6c9b83486
2 changed files with 17 additions and 1 deletions

View File

@ -49,6 +49,17 @@ IF ( DEFINED QE_BIN )
VERIFY_QE_PRESENT( ${QE_BIN} )
ENDIF()
######################################################################
# Verify PYSCF package is present
######################################################################
IF ( DEFINED PYSCF_BIN )
INCLUDE(CMake/python.cmake)
TEST_PYTHON_MODULE(pyscf HAVE_PYSCF)
IF (NOT HAVE_PYSCF)
MESSAGE( FATAL_ERROR "PYSCF_BIN was specified but could not import pyscf." )
ENDIF()
ENDIF()
######################################################################
# CTest
######################################################################

View File

@ -41,7 +41,12 @@ ELSE()
ENDIF()
IF(BUILD_AFQMC)
SUBDIRS("afqmc/workflow")
IF(PYSCF_BIN)
MESSAGE("PYSCF path specified as: ${PYSCF_BIN}.")
SUBDIRS("afqmc/workflow")
ELSE()
MESSAGE("PYSCF_BIN is not set. AFQMC workflow tests will not be performed.")
ENDIF()
ENDIF()
#