Once you have selected an MPD project and activated its corresponding environment, you may build your MPD project. This is done by typing
$ spack mpd buildThe default build generator is Make, although the Ninja generator
can be specified with the --generator option:
$ spack mpd build --generator NinjaGenerator commands may be specified after two contiguous hyphens --:
$ spack mpd build --generator Ninja -- <generator commands> ...It is also possible to clean the build area before running the build step:
$ spack mpd build --clean ...The spack mpd build command is just a wrapper for invoking two commands in the project's build directory:
$ cmake --preset default <srcs dir> -B <build dir> -DCMAKE_INSTALL_PREFIX=<install dir>
$ cmake --build <build dir> -- <generator commands> ...After the CMake configuration step has been completed (the first command above), you are permitted to use the generator commands directly if you are in the build directory of the project (e.g.):
$ cmake --preset default <srcs dir> -B <build dir> -DCMAKE_INSTALL_PREFIX=<install dir>
$ ninjaThis can be very helpful for doing iterative development where the CMake configuration command is not necessary.