Commit e23007a2 authored by Henderson, Shane's avatar Henderson, Shane
Browse files

Merge branch 'hotfix_genReqTables_pandas_only' into 'master'

Adds logic for enable/disable testGenReq

See merge request https://code.ornl.gov/futility/Futility/-/merge_requests/413
parents 5094ddae 80c0e125
Loading
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
#                          Futility Development Group                          !
#                             All rights reserved.                             !
#                                                                              !
# Futility is a jointly-maintained, open-source project between the University !
# of Michigan and Oak Ridge National Laboratory.  The copyright and license    !
# can be found in LICENSE.txt in the head directory of this repository.        !
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!

FUNCTION(CHECK_PYTHON_PANDAS)
    MESSAGE(STATUS "Checking for python package: pandas...")
    EXECUTE_PROCESS(
        COMMAND "${PYTHON_EXECUTABLE}" -c "import pandas"
        RESULT_VARIABLE PANDAS_RESULT
        OUTPUT_QUIET
        ERROR_QUIET
    )

    IF(PANDAS_RESULT EQUAL 0)
        MESSAGE(STATUS "Checking for python package: pandas... FOUND")
        GLOBAL_SET(PYTHON_HAS_PANDAS TRUE)
    ELSE()
        MESSAGE(STATUS "Checking for python package: pandas... NOT-FOUND")
        GLOBAL_SET(PYTHON_HAS_PANDAS FALSE)
    ENDIF()

    
ENDFUNCTION()
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -7,6 +7,10 @@
# can be found in LICENSE.txt in the head directory of this repository.        !
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
INCLUDE(${Futility_SOURCE_DIR}/cmake/CheckMPIF2008StandardCompiles.cmake)
INCLUDE(${Futility_SOURCE_DIR}/cmake/CheckPythonPandas.cmake)

CHECK_PYTHON_PANDAS()

IF(${PROJECT_NAME}_VERBOSE_CONFIGURE)
    MESSAGE("Configuring Futility compiler options for:")
    PRINT_VAR(PACKAGE_NAME)
@@ -17,6 +21,7 @@ IF(${PROJECT_NAME}_VERBOSE_CONFIGURE)
    PRINT_VAR(${PACKAGE_NAME}_ENABLE_PETSC)
    PRINT_VAR(${PACKAGE_NAME}_ENABLE_SLEPC)
    PRINT_VAR(${PACKAGE_NAME}_ENABLE_HDF5)
    PRINT_VAR(${PACKAGE_NAME}_ENABLE_PNG)
    PRINT_VAR(${PACKAGE_NAME}_ENABLE_MKL)
    PRINT_VAR(${PACKAGE_NAME}_ENABLE_PARDISO)
    PRINT_VAR(${PACKAGE_NAME}_ENABLE_BLAS)
+8 −1
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ SET(UNIT_TEST_NAMES
    testBLAS
    testStrings
    testTimes
    testGenReqTables
    testGeom_Points
    testGeom_Line
    testGeom_Plane
@@ -119,6 +118,14 @@ IF(${PACKAGE_NAME}_ENABLE_HDF5)
        )
ENDIF()

# add test if Python has pandas
IF(PYTHON_HAS_PANDAS)
    SET(UNIT_TEST_NAMES
        ${UNIT_TEST_NAMES}
        testGenReqTables
        )
ENDIF()

FOREACH(test ${UNIT_TEST_NAMES})
    ADD_SUBDIRECTORY(${test})
ENDFOREACH()