<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>We use a toolchain file to do the same thing:<br><br># the name of the target operating system <br>SET(CMAKE_SYSTEM_NAME Catamount)<br><br># set the compiler <br>set(CMAKE_C_COMPILER cc)<br>set(CMAKE_CXX_COMPILER CC)<br>set(CMAKE_Fortran_COMPILER ftn)<br><br>There is more info on it if you search around:<br><br>http://www.cmake.org/cmake/help/v3.0/manual/cmake-toolchains.7.html<br>http://www.vtk.org/Wiki/CMake_Cross_Compiling<br><br>Tim<br><br><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"KT Thompson" <kgt@lanl.gov><br><b>To: </b>"Lucas Pettey" <Lucas.Pettey@engilitycorp.com>, "cmake [cmake@cmake.org]" <cmake@cmake.org><br><b>Sent: </b>Tuesday, May 5, 2015 12:42:30 PM<br><b>Subject: </b>Re: [CMake] Cray wrappers and Intel compilers<br><br>
<style><!--
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p
{mso-style-priority:99;
margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
@list l0
{mso-list-id:2119135282;
mso-list-type:hybrid;
mso-list-template-ids:1955609582 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Lucas,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">When using CMake on our Cray environments (XE6, Intel compilers under the Cray wrappers), I do the following:</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">
</span></span></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Create CMakeCache.txt in the build directory with these contents:<br>
<br>
CMAKE_SYSTEM_NAME:STRING=Catamount</span></p>
<p class="MsoListParagraph"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">CMAKE_C_COMPILER:FILEPATH=cc</span></p>
<p class="MsoListParagraph"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">CMAKE_CXX_COMPILER:FILEPATH=CC
</span></p>
<p class="MsoListParagraph"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">CMAKE_Fortran_COMPILER:FILEPATH=ftn<br>
<br>
</span></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">
</span></span></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">cmake /path/to/source</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Maybe the CMake experts on the list can tell us a better way.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">-kt</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> CMake [mailto:cmake-bounces@cmake.org]
<b>On Behalf Of </b>Lucas.Pettey@engilitycorp.com<br>
<b>Sent:</b> Tuesday, May 05, 2015 10:14 AM<br>
<b>To:</b> cmake [cmake@cmake.org]<br>
<b>Subject:</b> [CMake] Cray wrappers and Intel compilers</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black">Hello,<br>
<br>
I have been trying to use Cmake 3.2.2 on a Cray XC30 with the Intel compilers loaded. I encounter the following error:</span></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black"><br>
/opt/cray/craype/2.2.0/bin/cc -o<br>
CMakeFiles/cmTryCompileExec2303156381.dir/testCCompiler.c.o -c<br>
/p/home/lpettey/adh/parmetis-4.0.3/build/Linux-x86_64/CMakeFiles/CMakeTmp/testCCompiler.c<br>
<br>
<br>
Linking C executable cmTryCompileExec2303156381<br>
<br>
/p/home/lpettey/cmake-3.2.2/install/bin/cmake -E cmake_link_script<br>
CMakeFiles/cmTryCompileExec2303156381.dir/link.txt --verbose=1<br>
<br>
/opt/cray/craype/2.2.0/bin/cc<br>
CMakeFiles/cmTryCompileExec2303156381.dir/testCCompiler.c.o -o<br>
cmTryCompileExec2303156381 -rdynamic<br>
<br>
ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in<br>
`/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/libc.a(strcmp.o)'<br>
can not be used when making an executable; recompile with -fPIE and relink<br>
with -pie<br>
<br>
Is there any way to ask Cmake not to add the -rdynamic to the link line? I believe this is what is causing the error.<br>
<br>
Thanks,</span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black">Lucas Pettey, PhD </span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black;background:white">HPCMP</span><span style="font-size:11.5pt;font-family:"Calibri",sans-serif;color:#005B99"> </span><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black">PETTT
EQM CTA Lead</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black">ERDC-DSRC OnSite </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black">Vicksburg, MS</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black">512-297-9833 Mobile (preferred)</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black">601-634-2980 Office</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black"><a href="mailto:lucas.pettey@engilitycorp.com" target="_blank">lucas.pettey@engilitycorp.com</a></span></p>
</div>
</div>
</div>
</div>
</div>
<br>-- <br><br>Powered by www.kitware.com<br><br>Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ<br><br>Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br><br>CMake Support: http://cmake.org/cmake/help/support.html<br>CMake Consulting: http://cmake.org/cmake/help/consulting.html<br>CMake Training Courses: http://cmake.org/cmake/help/training.html<br><br>Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br><br>Follow this link to subscribe/unsubscribe:<br>http://public.kitware.com/mailman/listinfo/cmake</div><br></div></body></html>