xref: /phasta/phSolver/CMakeLists.txt (revision fad91747fc273859c9aaa9073947f8f2bf249d38)
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)
13link_directories(${PETSC_LIBRARY_DIRS})
14include_directories(${PETSC_INCLUDE_DIRS})
15add_definitions(-DHAVE_PETSC)
16option(IS_JEDS_BRANCH "Use Jed's Experimental PETSc Optimizations" OFF)
17if(IS_JEDS_BRANCH)
18	add_definitions(-DJEDBROWN)
19endif()
20endif(PHASTA_USE_PETSC)
21
22add_subdirectory(common)
23option(PHASTA_INCOMPRESSIBLE "Build the incompressible solver" OFF)
24option(PHASTA_COMPRESSIBLE "Build the compressible solver" ON)
25if(PHASTA_INCOMPRESSIBLE)
26add_subdirectory(incompressible)
27endif(PHASTA_INCOMPRESSIBLE)
28if(PHASTA_COMPRESSIBLE)
29add_subdirectory(compressible)
30endif(PHASTA_COMPRESSIBLE)
31
32configure_file(
33  "${CMAKE_CURRENT_SOURCE_DIR}/phastaConfig.cmake.in"
34  "${CMAKE_BINARY_DIR}/phastaConfig.cmake"
35)
36
37