<div dir="ltr"><p class="MsoNormal">The wrapper scripts aren’t ours, they are part of 
the TAU profiler tool from the University of Oregon, so it’s not 
something we would like to edit or mingle with.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">As a workaround I’ve implemented a custom command 
that runs post build which does the job, I’ll post it here if anyone 
else is having the same issue:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">################################</p>
<p class="MsoNormal">if(UNIX)</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">#Cleanup TAU temp files</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">    add_custom_command(TARGET  myApp.exe </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">      POST_BUILD</p>
<p class="MsoNormal">      </p>
<p class="MsoNormal">      #Move TAU temp files to output folder</p>
<p class="MsoNormal">      COMMAND  mv</p>
<p class="MsoNormal">      ARGS     -f *.pp.* ${LIBRARY_OUTPUT_PATH} </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">      COMMENT  "Cleaning TAU temp files"</p>
<p class="MsoNormal">    )</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">endif(UNIX)</p>
<p class="MsoNormal">################################</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">The only issue with this is that if I cancel the 
build intentionally while it’s taking place (e.g. CTRL+C) or the build 
fails for whatever reason, the TAU temp files will remain in the current
 directory since the clean up only happens after
 a successful post build.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">If anyone has any better ideas please let me know.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I came across this document online and it mentions 
patching CMake to work better with TAU, I am guessing this is not 
official from CMake, but maybe worth thinking of to add new CMake TAU 
variables:</p>
<p class="MsoNormal"><a href="http://graal.ens-lyon.fr/%7Ebdepardo/perso/docs/TAU.pdf" target="_blank">http://graal.ens-lyon.fr/~bdepardo/perso/docs/TAU.pdf</a></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><b><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:rgb(51,102,255)">Mohamad O. Sindi</span></b><span style="color:blue"></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:rgb(51,102,255)">EXPEC Advanced Research Center</span></p>
<span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:rgb(51,102,255)">Saudi Aramco</span><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 6, 2014 at 6:42 PM, Hendrik Sattler <span dir="ltr"><<a href="mailto:post@hendrik-sattler.de" target="_blank">post@hendrik-sattler.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 6. April 2014 13:23:19 MESZ, sindimo <<a href="mailto:sindimo@gmail.com">sindimo@gmail.com</a>> wrote:<br>

>Thanks Eike for the input.<br>
><br>
>I went with your suggestion and I am using the environment variables<br>
>now CC<br>
>and FC to point to the TAU wrappers.<br>
><br>
>Just for the record this specific app isn't cross platform, just on<br>
>Linux.<br>
><br>
>It's still identifying the TAU wrappers as GNU and not Intel. For now<br>
>we<br>
>can live with forcing the compiler ID to be Intel.<br>
><br>
>The second issue explained previously is the one more concerning, any<br>
>hints<br>
>on how to get CMake to dump the TAU temporary files (e.g. *.pp.f,<br>
>*.pp.pdb,<br>
>*.pp.inst.f) in the correct output folder instead of the current<br>
>directory?<br>
<br>
</div>did you try to fix this issue on your wrapper scripts? I'd assume it has something to do with the current working directory...<br>
<div><div class="h5"><br>
>None of these variables seem to be honored when dumping the TAU<br>
>temporary<br>
>files (LIBRARY_OUTPUT_PATH, CMAKE_LIBRARY_OUTPUT_DIRECTORY,<br>
>CMAKE_Fortran_MODULE_DIRECTORY)<br>
><br>
>Thanks again for your help.<br>
><br>
>On Sunday, April 6, 2014, Rolf Eike Beer <<a href="mailto:eike@sf-mail.de">eike@sf-mail.de</a>> wrote:<br>
><br>
>> Am Sonntag, 6. April 2014, 10:31:57 schrieb sindimo:<br>
>> > Dear CMake Support,<br>
>> ><br>
>> > We've been using your wonderful tool for quite some time to do our<br>
>cross<br>
>> > platform builds.<br>
>> ><br>
>> > We recently started using the TAU profiler and are having some<br>
>issues<br>
>> when<br>
>> > integrating it with CMake and would appreciate your help with it<br>
>please.<br>
>> ><br>
>> > We set our compilers in CMake to the TAU wrappers:<br>
>> ><br>
>> > set (CMAKE_Fortran_COMPILER<br>
>> > /red/cmt3/vol5/tau/tau_installation/x86_64/bin/tau_f90.sh)<br>
>><br>
>> I don't read on ;) Are you doing this in a toolchain file? Otherwise<br>
>do it<br>
>> either there or using the environment variables (CC, CXX, and so on).<br>
>If<br>
>> you<br>
>> start fiddling with the compiler inside a project environment that<br>
>usually<br>
>> means trouble.<br>
>><br>
>> Eike<br>
><br>
><br>
</div></div>>------------------------------------------------------------------------<br>
<br>
<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div></div>