@@ -100,16 +100,14 @@ endif
100100
101101# parallel build options
102102is_extended_build = get_option (' extended' )
103+ is_parallel_build = get_option (' parallel' ) or is_extended_build
103104is_cray = get_option (' cray' )
104105is_mpich = get_option (' mpich' )
105106if is_cray and build_machine .system() != ' linux'
106- error (' cray=true only supported on linux systems' )
107+ error (' cray only supported on linux systems' )
107108endif
108- if not is_extended_build
109- is_extended_build = get_option (' parallel' )
110- endif
111- if is_cray and not is_extended_build
112- is_extended_build = true
109+ if is_cray and not is_parallel_build
110+ is_parallel_build = true
113111 is_mpich = true
114112endif
115113if is_mpich
@@ -119,7 +117,12 @@ if is_mpich
119117 mpifort_name = ' mpichfort'
120118 endif
121119endif
122- message (' Extended build:' , is_extended_build)
120+
121+ if is_extended_build
122+ message (' Extended build:' , is_extended_build)
123+ elif is_parallel_build
124+ message (' Parallel build:' , is_parallel_build)
125+ endif
123126
124127# windows options for petsc
125128petsc_dir_rel = ' ..' / ' petsc'
@@ -140,7 +143,7 @@ dependencies = [ ]
140143extra_cmp_args = [ ]
141144
142145# load petsc, mpi, and netcdf dependencies/libraries
143- if is_extended_build
146+ if is_parallel_build or is_extended_build
144147 # find petsc
145148 if build_machine .system() != ' windows'
146149 petsc = dependency (' PETSc' , required : true )
@@ -162,7 +165,12 @@ if is_extended_build
162165 endif
163166 extra_cmp_args += [ ' -D__WITH_MPI__' ]
164167 with_mpi = true
168+ else
169+ with_petsc = false
170+ with_mpi = false
171+ endif
165172
173+ if is_extended_build
166174 # find netcdf
167175 if build_machine .system() != ' windows'
168176 netcdff = dependency (' netcdf' , language : ' fortran' , required : false )
@@ -181,8 +189,6 @@ if is_extended_build
181189 endif
182190else
183191 with_netcdf = false
184- with_petsc = false
185- with_mpi = false
186192endif
187193
188194# GCC profile options need to be netcdf aware due to HDF5 issue
@@ -208,7 +214,7 @@ compile_args += extra_cmp_args
208214add_project_arguments (fc.get_supported_arguments(compile_args), language : ' fortran' )
209215add_project_link_arguments (fc.get_supported_arguments(link_args), language : ' fortran' )
210216
211- if is_extended_build and build_machine .system() == ' windows'
217+ if is_parallel_build and build_machine .system() == ' windows'
212218 message (' Compiling PETSc Fortran modules' )
213219 petsc_incdir = include_directories ([petsc_dir_rel / ' include' , petsc_compiled_rel / ' include' ])
214220 petsc_src = petsc_dir_abs / ' src'
0 commit comments