<font color='black' size='2' face='arial'>If you don't want to see the warning, then <font size="2">also pass in --no-warn-unused-cl<font size="2">i on the command line.<br>
<br>
</font><font size="2"> --no-warn-unused-cli = Don't warn about command line options.</font><br>
</font><font color="black" face="arial" size="2">
<div> <br>
<font size="2">But that suppresses the warning <font size="2">for all unreferenced variables.<br>
<br>
<font size="2">Or... add<font size="2">:<br>
<br>
</font> message<font size="2">(STATUS "CMAKE_TOOLCHAIN<font size="2">_FILE='${CMAKE_TOOLCHAIN_FILE}'</font>")</font></font><br>
</font></font>
</div>
<div> <br>
<font size="2">to the project<font size="2">'s CMakeLists.txt file so </font></font>the <font size="2">v<font size="2">ariable is always referenced.</font></font><br>
</div>
<div> <br>
<font size="2">The point is: CMAKE_<font size="2">TOOLCHAI<font size="2">N_FILE is only read on the first configure. After that point, all toolchain stuff is cached and the file is unnecessary for subsequent configures.<br>
<br>
</font></font></font><font size="2">That bu<font size="2">g should just be closed as "won<font size="2">'t fix" because it's not a bug. It's the intended behavior, and there are multiple ways to avoid the legitimate warning.<br>
<br>
<br>
<font size="2">Just my opinion,<br>
<font size="2">D<br>
<br>
<br>
</font></font></font></font></font><br>
</div>
<div style="font-family:arial,helvetica;font-size:10pt;color:black">-----Original Message-----<br>
From: Pat Marion <pat.marion@kitware.com><br>
To: Michael Wild <themiwi@gmail.com><br>
Cc: cmake <cmake@cmake.org><br>
Sent: Wed, Feb 6, 2013 7:23 am<br>
Subject: Re: [CMake] Passing CMAKE_TOOLCHAIN_FILE on command line causes CMake warning<br>
<br>
<div id="AOLMsgPart_2_e3c6e829-0147-4e5c-b5b5-c748928ffacc">
That's a pretty messy workaround though, I think. ExternalProject_Add passes in lots of variables, including ones that do not typically change, like CMAKE_CXX_COMPILER. Why impose a special requirement on the CMAKE_TOOLCHAIN_FILE variable? Would a patch to avoid the warning be a welcome change, or is there a reason the warning should remain?<br>
<br>
Pat<br>
<br>
<div class="gmail_quote">On Wed, Feb 6, 2013 at 9:52 PM, Michael Wild <span dir="ltr"><<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi<br>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">
<div class="im">On Wed, Feb 6, 2013 at 11:59 AM, Pat Marion <span dir="ltr"><<a href="mailto:pat.marion@kitware.com">pat.marion@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm emailing about <a target="_blank" href="http://public.kitware.com/Bug/view.php?id=13093">bug 13093</a> in the backlog. I found <a target="_blank" href="http://www.cmake.org/pipermail/cmake/2011-February/042556.html">comments by Brad</a> that suggest it's a legitimate warning, but I'm not sure how a project could avoid the warning.</blockquote>
</div>
<div><br>
By not specifying the toolchain file, for instance? If you have the problem in conjunction with ExternalProject_Add, check whether the CMakeCache.txt file exists in the build tree of the external project. If not, include the flag, otherwise drop it. <br>
<br>
My 2c<span class="HOEnZb"><font color="#888888"><br>
<br>
Michael<br>
</font></span></div>
</div>
</div>
</div>
</blockquote></div>
<br>
</div>
<!-- end of AOLMsgPart_2_e3c6e829-0147-4e5c-b5b5-c748928ffacc -->
<div id="AOLMsgPart_3_e3c6e829-0147-4e5c-b5b5-c748928ffacc" style="margin: 0px;font-family: Tahoma, Verdana, Arial, Sans-Serif;font-size: 12px;color: #000;background-color: #fff;">
<pre style="font-size: 9pt;"><tt>--
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a>
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>
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>
Follow this link to subscribe/unsubscribe:
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a>
</tt></pre>
</div>
<!-- end of AOLMsgPart_3_e3c6e829-0147-4e5c-b5b5-c748928ffacc -->
</div>
</font></font>