I am using spack setup to create the environment for a software package that I am developing. I noticed that if I pass command line compiler flags (e.g. cflags="-O3 -march=native" cxxflags="-O3 -march=native" fflags="-O3 -march=native"), spack will rebuild all of the dependent packages each time I run the setup command. If I don't have the command line arguments it properly recognizes that the packages are built. Note that it doesn't reinstall the modules because it recognizes that they are already installed and it doesn't create a duplicate of the package, but it does build it again. @becker33