@@ -424,7 +424,7 @@ When you have an activated environment, you can edit the associated configuratio
424424 packages :
425425 all :
426426 require :
427- - one_of : ["%llvm", "%gcc"]
427+ - any_of : ["%llvm", "%gcc"]
428428 providers :
429429 mpi : [mpich, openmpi]
430430
@@ -455,13 +455,16 @@ Instead, we'll update our config to force disable it:
455455 packages :
456456 all :
457457 require :
458- - one_of : ["%llvm", "%gcc"]
458+ - any_of : ["%llvm", "%gcc"]
459459 providers :
460460 mpi : [mpich, openmpi]
461461 hdf5 :
462- require : ~mpi
462+ require :
463+ - spec : " ~mpi"
464+ - any_of : ["%llvm", "gcc"]
463465
464466
467+ Note that defining ``hdf5 `` overrides everything under ``all ``, so the Clang preference must be reintroduced.
465468Now hdf5 will concretize without an MPI dependency by default.
466469
467470.. literalinclude :: outputs/config/3.prefs.out
@@ -493,22 +496,27 @@ Let's tell Spack about this package and where it can be found:
493496 packages :
494497 all :
495498 require :
496- - one_of : ["%llvm", "%gcc"]
499+ - any_of : ["%llvm", "%gcc"]
497500 providers :
498501 mpi : [mpich, openmpi]
499502 hdf5 :
500- require : ~mpi
503+ require :
504+ - spec : " ~mpi"
505+ - any_of : ["%llvm", "gcc"]
501506 curl :
502507 externals :
503508 - spec : curl@7.81.0 %gcc@11.4.0
504509 prefix : /usr
505510 buildable : false
506-
511+ cmake :
512+ require :
513+ - spec : " ~qtgui"
507514
508515 Here, we've told Spack that Curl 7.81.0 is installed on our system.
509516We've also told it the installation prefix where Curl can be found.
510517We don't know exactly which variants it was built with, but that's okay.
511518Finally, we set ``buildable: false `` to require that Spack not try to build its own.
519+ The cmake config isn't strictly required, but you might get a strange concretization without it.
512520
513521.. The weighting/preferences dont work quite the same so I skipped right to buildable:false
514522
@@ -540,14 +548,17 @@ While we're editing the ``spack.yaml`` file, make sure to configure HDF5 to be a
540548 packages :
541549 all :
542550 require :
543- - one_of : ["%llvm", "%gcc"]
551+ - any_of : ["%llvm", "%gcc"]
544552 providers :
545553 mpi : [mpich, openmpi]
546554 curl :
547555 externals :
548556 - spec : curl@7.81.0 %gcc@11.4.0
549557 prefix : /usr
550558 buildable : false
559+ cmake :
560+ require :
561+ - spec : " ~qtgui"
551562 mpich :
552563 externals :
553564 - spec : mpich@4.0+hydra device=ch4 netmod=ofi
0 commit comments