<html><head><title></title></head><body><!-- rte-version 0.2 9947551637294008b77bce25eb683dac --><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium"><span>Trying to get this to work by setting a proper <span class="">CMAKE_Fortran_PREPROCESS_SOURCE</span> variable</span><span>.</span></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium"><span><br></span></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium"><span>Here is GNU_Fortran for reference. </span></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium"><span class="">set(CMAKE_Fortran_PREPROCESS_SOURCE</span></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium"><div class="rte-style-maintainer" style="font-size: small; font-family: "BB.Proportional";" data-color="global-default" data-bb-font-size="medium"><span></span></div></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium"><span> "<<span class="">CMAKE_Fortran_COMPILER</span>> -cpp <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> -o <PREPROCESSED_SOURCE>")</span></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium"><br></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium">The analogous switch for -E in XL is -d -qnoobject. However, C<span>Make expects the PREPROCESSED_SOURCE output to be in the form <SOURCE>-pp.f and XL does not allow you to control that. The output is always of the form F<SOURCE>.f </span></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium"><span><br></span></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium"><span>Is there anything I can do here like putting redirection or two commands inside the CMAKE_Fortran_PREPROCESS_SOURCE variable?</span></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium"><span><br></span></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium"><span>Here is a relevant snippet from the XL compiler documentation on this switch.</span></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium"><br></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium">“To call cpp for a particular file, use a file suffix of .F, .F77, .F90, .F95, .F03, or .F08. If you specify the -d option, each .F* file filename.F* is preprocessed into an intermediate file Ffilename.f, which is then compiled. ...<span> If you only want to preprocess and do not want to produce object or executable files, specify the -qnoobject option also.”</span></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium"><span><br></span></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium"><span>-ephi </span></div><div class="rte-style-maintainer" style="white-space: pre-wrap; font-size: small; font-family: "BB.Proportional";" data-bb-font-size="medium"><br></div></body></html>