1project(phSolver) 2set(CMAKE_Fortran_MODULE_DIRECTORY ${phSolver_BINARY_DIR}/modules) 3include_directories(${CMAKE_Fortran_MODULE_DIRECTORY}) 4 5set(CASES "/path/to/test/cases/" 6 CACHE string 7 "path to the test cases") 8option(PHASTA_TESTING "enable tests" OFF) 9 10option(PHASTA_USE_PETSC "Use PETSc GMRES Solver" OFF) 11if(PHASTA_USE_PETSC) 12find_package(PETSc REQUIRED) 13find_path(PETSC_INC petscsys.h HINTS /usr/include ${PETSC_PACKAGE_INCLUDES}) 14find_path(PETSC_LIB libpetsc.a HINTS /usr/lib ${PETSC_PACKAGE_INCLUDES}../lib) 15include_directories(${PETSC_PACKAGE_INCLUDES} ${PETSC_INC}) 16link_directories(${PETSC_LIB}) 17add_definitions(-DHAVE_PETSC) 18endif(PHASTA_USE_PETSC) 19 20add_subdirectory(common) 21option(PHASTA_INCOMPRESSIBLE "Build the incompressible solver" OFF) 22option(PHASTA_COMPRESSIBLE "Build the compressible solver" ON) 23if(PHASTA_INCOMPRESSIBLE) 24add_subdirectory(incompressible) 25endif(PHASTA_INCOMPRESSIBLE) 26if(PHASTA_COMPRESSIBLE) 27add_subdirectory(compressible) 28endif(PHASTA_COMPRESSIBLE) 29 30configure_file( 31 "${CMAKE_CURRENT_SOURCE_DIR}/phastaConfig.cmake.in" 32 "${CMAKE_BINARY_DIR}/phastaConfig.cmake" 33) 34 35