Skip to content

Commit

Permalink
remove more redundant find_package calls
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Aug 19, 2020
1 parent 6526724 commit 43f1315
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
4 changes: 0 additions & 4 deletions src/clib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ endif ()

#===== GPTL =====
if (PIO_ENABLE_TIMING)
find_package (GPTL COMPONENTS C QUIET)
if (GPTL_C_FOUND)
message (STATUS "Found GPTL C: ${GPTL_C_LIBRARIES}")
target_include_directories (pioc
Expand Down Expand Up @@ -116,9 +115,6 @@ else ()
endif ()

#===== PnetCDF-C =====
if (WITH_PNETCDF)
find_package (PnetCDF "1.7.0" COMPONENTS C)
endif ()
if (PnetCDF_C_FOUND)
target_include_directories (pioc
PUBLIC ${PnetCDF_C_INCLUDE_DIRS})
Expand Down
9 changes: 0 additions & 9 deletions src/flib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ endforeach ()

#===== MPI =====
if (PIO_USE_MPISERIAL)
find_package (MPISERIAL COMPONENTS Fortran REQUIRED)
if (MPISERIAL_Fortran_FOUND)
target_compile_definitions (piof
PRIVATE _MPISERIAL)
Expand All @@ -154,8 +153,6 @@ if (PIO_USE_MPISERIAL)
set (WITH_PNETCDF FALSE)
set (MPI_Fortran_INCLUDE_PATH ${MPISERIAL_Fortran_INCLUDE_DIRS})
endif ()
else ()
find_package (MPI REQUIRED)
endif ()

# Check MPI I/O capabilities
Expand Down Expand Up @@ -184,9 +181,6 @@ endif ()
find_path(MPIMOD_PATH
NAMES mpi.mod MPI.mod
HINTS ${MPI_Fortran_INCLUDE_PATH})
if (PIO_ENABLE_TIMING)
find_package (GPTL COMPONENTS Fortran_Perf QUIET)
endif ()

check_macro (MPI_HAS_Fortran_MOD
NAME TryMPIMod.f90
Expand Down Expand Up @@ -236,9 +230,6 @@ else ()
endif ()

#===== PnetCDF =====
if (WITH_PNETCDF)
find_package (PnetCDF "1.6" COMPONENTS Fortran REQUIRED)
endif ()
if (PnetCDF_Fortran_FOUND)
target_include_directories (piof
PUBLIC ${PnetCDF_Fortran_INCLUDE_DIRS})
Expand Down
4 changes: 1 addition & 3 deletions src/gptl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ endif ()

#===== MPI =====
if (PIO_USE_MPISERIAL)
find_package (MPISERIAL COMPONENTS C Fortran REQUIRED)
if (MPISERIAL_C_FOUND AND MPISERIAL_Fortran_FOUND)
target_compile_definitions (gptl
PRIVATE HAVE_MPI)
Expand All @@ -109,8 +108,7 @@ if (PIO_USE_MPISERIAL)
set (MPI_C_LIBRARIES ${MPISERIAL_C_LIBRARIES})
set (MPI_Fortran_INCLUDE_PATH ${MPISERIAL_Fortran_INCLUDE_DIRS})
endif ()
else ()
find_package (MPI REQUIRED)
else()
if (MPI_C_FOUND AND MPI_Fortran_FOUND)
target_compile_definitions (gptl
PUBLIC HAVE_MPI)
Expand Down

0 comments on commit 43f1315

Please sign in to comment.