Skip to content

Commit

Permalink
CMake: FindPETSc must not overwrite CMAKE_Fortran_FLAGS (#1464)
Browse files Browse the repository at this point in the history
## Summary

FindPETSc used to set ```CMAKE_Fortran_FLAGS``` to the list of PETSc include directories. This caused problems with the compilation of Fortran files (see Issue #1463 ). This PR fixes this. 

## Additional background

## Checklist

The proposed changes:
- [X] fix a bug or incorrect behavior in AMReX
- [ ] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX users
- [ ] are described in the proposed changes to the AMReX documentation, if appropriate
  • Loading branch information
mic84 authored Oct 18, 2020
1 parent f64fb79 commit aef02b9
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Tools/CMake/FindPETSc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ message(STATUS "arch ${PETSC_INCLUDE_DIRS_ARCH}")
set(PETSC_INCLUDE_DIRS ${PETSC_INCLUDE_DIRS_BASE} ${PETSC_INCLUDE_DIRS_ARCH})
message(STATUS "joe ${PETSC_INCLUDE_DIRS}")

#Set Fortran include directories TODO: currently overwrites any given values
set(CMAKE_Fortran_FLAGS ${PETSC_INCLUDE_DIRS})

# Find libraries
find_library(PETSC_LIBRARIES PATHS ${PETSC_DIR}/${PETSC_ARCH}/lib NAMES petsc)

Expand Down

0 comments on commit aef02b9

Please sign in to comment.