<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">Dear All,</p>
<p class="MsoNormal">We currently have a FORTRAN library we’re building with CMake (around 1000 files of FORTRAN).</p>
<p class="MsoNormal">ADD_LIBRARY(<u></u><u></u></p>
<p class="MsoNormal">My_Fortran_Lib<u></u><u></u></p>
<p class="MsoNormal">…….<u></u><u></u></p>
<p class="MsoNormal">)</p>
<p class="MsoNormal">For the release build we set the release compilation flags with “CMAKE_Fortran_FLAGS_RELEASE” and set “CMAKE_BUILD_TYPE” to “Release” for those flags to be honored.</p>
<p class="MsoNormal">For the debug build we set the debug compilation flags with “CMAKE_Fortran_FLAGS_DEBUG” and set “CMAKE_BUILD_TYPE” to “Debug” for those flags to be honored.</p>
<p class="MsoNormal">Out of those 1000 files we have a subset that we want to build always in “Release” mode while the rest of the files can be built either in Debug or Release depending on what “CMAKE_BUILD_TYPE” is set to.</p>
<p class="MsoNormal">Is there a way to tell CMake to build a specific subset of files always with Release flags even if “CMAKE_BUILD_TYPE” was Debug?</p>
<p class="MsoNormal">Thank you for your help.</p>
<p class="MsoNormal"><b><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#3366ff">Mohamad O. Sindi</span></b><span style="color:blue"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#3366ff">EXPEC Advanced Research Center</span></p><p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#3366ff"></span><span style="color:rgb(51,102,255);font-family:Arial,sans-serif;font-size:7.5pt">Saudi Aramco</span></p>
<p class="MsoNormal"><u></u></p></div>
</div>
<br>