<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">I’m having difficulty getting ExternalProject_Add to work with XCode. It appears to be a CMake bug, and I’ll file it if no one corrects me. I’ve been unable to find any other reports of this issue.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Specifically, I’m getting the following error:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeCInformation.cmake:37 (get_filename_component):<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> get_filename_component called with incorrect number of arguments<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">Call Stack (most recent call first):<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> CMakeLists.txt:2 (PROJECT)<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">CMake Error: Internal CMake error, TryCompile configure of cmake failed<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This is in a log file pointed to by this error in the main project flow:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">CMake Error at /Users/Shared/jenkins/Home/workspace/Mac Agent Branch/build/gtest-prefix/src/gtest-stamp/gtest-configure.cmake:17 (message):<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> Command failed: 1<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> '/Applications/CMake 2.8-10.app/Contents/bin/cmake' '-Dgtest_force_shared_crt=ON' '-GXcode' '/Users/Shared/jenkins/Home/workspace/Mac Agent Branch/googletest'<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Has anyone seen this before? Looking at CMakeCInformation.cmake:37, it looks like it couldn’t find the compiler, which makes me suspect the ‘-GXcode’ isn’t being handled properly. Does CMake require a space there?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My ExternalProject_Add command looks like this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">ExternalProject_Add(<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> gtest<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> SOURCE_DIR ${googletest_dir}<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> CMAKE_ARGS -Dgtest_force_shared_crt=ON<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> INSTALL_COMMAND ""<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> LOG_DOWNLOAD ON<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> LOG_CONFIGURE ON<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> LOG_BUILD ON)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any suggestions are appreciated.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you,<o:p></o:p></p>
<p class="MsoNormal">Todd<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">--<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Todd Greer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Principal Scientist, Affinegy, Inc.</span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>