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) 13set (BUILD_SHARED_LIBS NO) #FIXME - the petsc cmake config 14 #FIXME - file forces shared libs on... 15 #FIXME - which causes linking problems for us 16find_path(PETSC_INC petscsys.h HINTS /usr/include ${PETSC_PACKAGE_INCLUDES}) 17find_path(PETSC_LIB libpetsc.a HINTS /usr/lib ${PETSC_PACKAGE_INCLUDES}../lib) 18include_directories(${PETSC_PACKAGE_INCLUDES} ${PETSC_INC}) 19link_directories(${PETSC_LIB}) 20add_definitions(-DHAVE_PETSC) 21endif(PHASTA_USE_PETSC) 22 23add_subdirectory(common) 24option(PHASTA_INCOMPRESSIBLE "Build the incompressible solver" OFF) 25option(PHASTA_COMPRESSIBLE "Build the compressible solver" ON) 26if(PHASTA_INCOMPRESSIBLE) 27add_subdirectory(incompressible) 28endif(PHASTA_INCOMPRESSIBLE) 29if(PHASTA_COMPRESSIBLE) 30add_subdirectory(compressible) 31endif(PHASTA_COMPRESSIBLE) 32 33configure_file( 34 "${CMAKE_CURRENT_SOURCE_DIR}/phastaConfig.cmake.in" 35 "${CMAKE_BINARY_DIR}/phastaConfig.cmake" 36) 37 38