By using a combination of heteroepitaxial growth, structure refinement based on synchrotron x-ray diffraction, and first-principles calculations, we show that the symmetry-protected Dirac line nodes in the topological semimetallic perovskite SrIrO_{3} can be lifted simply by applying epitaxial constraints. In particular, the Dirac gap opens without breaking the *Pbnm* mirror symmetry. In virtue of a symmetry-breaking analysis, we demonstrate that the original symmetry protection is related to the *n*-glide operation, which can be selectively broken by different heteroepitaxial structures. This symmetry protection renders the nodal line a nonsymmorphic Dirac semimetallic state. The results highlight the vital role of crystal symmetry in spin-orbit-coupled correlated oxides and provide a foundation for experimental realization of topological insulators in iridate-based heterostructures.