Not sure why testing is needed, though, can you elaborate please @w8jcik?
I don't know the direct reason, but without this flag, CMake fails with following message
-- Found Python: /home/user/.spack/root/opt/spack/linux-ubuntu22.04-skylake/gcc-9.4.0/python-3.9.12-x4msfzae5cpz7r4ggq33caqlv72afasg/bin/python3.9 (found version "3.9.12") found components: Interpreter
-- Found MPI_C: /home/user/.spack/root/opt/spack/linux-ubuntu22.04-skylake/gcc-9.4.0/openmpi-4.1.3-awkfuq5qz6p6oqwjnpa5trweop4iaika/lib/libmpi.so (found version "3.1")
-- Found MPI_CXX: /home/user/.spack/root/opt/spack/linux-ubuntu22.04-skylake/gcc-9.4.0/openmpi-4.1.3-awkfuq5qz6p6oqwjnpa5trweop4iaika/lib/libmpi.so (found version "3.1")
-- Found MPI_Fortran: /home/user/.spack/root/opt/spack/linux-ubuntu22.04-skylake/gcc-9.4.0/openmpi-4.1.3-awkfuq5qz6p6oqwjnpa5trweop4iaika/lib/libmpi_usempif08.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1") found components: C CXX Fortran
-- Performing Test f2008-norm2
-- Performing Test f2008-norm2 - Success
-- Performing Test f2008-block_construct
-- Performing Test f2008-block_construct - Success
-- Performing Test f2008-contiguous
-- Performing Test f2008-contiguous - Success
-- Performing Test f95-reshape-order-allocatable
-- Performing Test f95-reshape-order-allocatable - Success
-- FYPP preprocessor found.
-- Configuring done
CMake Error at docs/CMakeLists.txt:17 (add_dependencies):
The dependency target "doc_copy_tests" of target "doc" does not exist.
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
I don't know the direct reason, but without this flag, CMake fails with following message
Looks like some hidden dependency.
Originally posted by @w8jcik in https://github.com/spack/spack/issues/30891#issuecomment-1139594965