<div dir="ltr"><div><div>Ok thanks.<br></div>But it is unfortunate, since it means that really great macros, such as <code>project_guarded<br>(see </code><a href="http://stackoverflow.com/a/33100078">http://stackoverflow.com/a/33100078</a>)<br></div><div>cannot be used everywhere, as a substitute for <span style="font-family:monospace,monospace">project</span>. <br></div><div><div><div><div class="gmail_extra"><br><br><br><div class="gmail_quote">On Tue, Apr 26, 2016 at 8:04 PM, Chuck Atkins <span dir="ltr"><<a href="mailto:chuck.atkins@kitware.com" target="_blank">chuck.atkins@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>ajneu,<br><br></div>The call to project(...) needs to be explicit.  See <a href="https://cmake.org/cmake/help/v3.5/command/project.html" target="_blank">https://cmake.org/cmake/help/v3.5/command/project.html</a>:<br><br><div style="margin-left:40px">The top-level <code><span>CMakeLists.txt</span></code> file for a project must contain a
literal, direct call to the <span></span><a href="https://cmake.org/cmake/help/v3.5/command/project.html#command:project" title="project" target="_blank"><code><span>project()</span></code></a> command; loading one
through the <span></span><a href="https://cmake.org/cmake/help/v3.5/command/include.html#command:include" title="include" target="_blank"><code><span>include()</span></code></a> command is not sufficient. </div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr">- Chuck<br></div></div></div>
<br><div class="gmail_quote"><div><div class="h5">On Tue, Apr 26, 2016 at 1:57 PM, aj neu <span dir="ltr"><<a href="mailto:ajneu1@gmail.com" target="_blank">ajneu1@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Hi, <br><br></div>when calling `project`<br></div>...as seen here<br>... <a href="https://github.com/ajneu/cmake_project_via_macro/blob/5972c7362e11fdbaa09d9defe8cca2dcea79e606/CMakeLists.txt#L33" target="_blank">https://github.com/ajneu/cmake_project_via_macro/blob/5972c7362e11fdbaa09d9defe8cca2dcea79e606/CMakeLists.txt#L33</a><br>everything is ok.<br></div><br><br></div>BUT when calling `project` via a macro (that was included)<br></div>... as seen here<br>... <a href="https://github.com/ajneu/cmake_project_via_macro/blob/master/CMakeLists.txt#L33" target="_blank">https://github.com/ajneu/cmake_project_via_macro/blob/master/CMakeLists.txt#L33</a> <br></div>the behaviour is not as expected.<br><br></div><div>Why?<br><br>(Details are here: <a href="https://github.com/ajneu/cmake_project_via_macro" target="_blank">https://github.com/ajneu/cmake_project_via_macro</a>)<br></div><div><br></div><br></div>Is this a bug?<br><br></div>Thanks<br></div>ajneu<br></div>
</div><br></div><br></div></div></blockquote></div></div></blockquote></div><br></div></div></div></div></div>