<div class="gmail_quote">On Mon, May 21, 2012 at 3:30 AM, Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2012/5/21 <<a href="mailto:norulez@me.com">norulez@me.com</a>>:<br>
<div class="im">> Is there an environment variable or a CMake/CPack variable which is must set?<br>
<br>
</div>Currently AFAIK there aren't any.<br>
But it would be easy to add, you may propose a patch.<br>
<div class="im"><br>
> how can I configure a project for Visual Studio to use the "--verbose" and the "--debug"<br>
> options/command line parameters?<br>
<br>
</div>As a workaround I would suggest to craft a custom target that will do the job:<br>
<br>
add_custom_target(PACKAGE_DEBUG<br>
COMMAND ${CMAKE_CPACK_COMMAND} --debug --verbose<br>
--config CPackConfig.cmake<br>
COMMENTS "Build package with debug and verbose output")<br>
<span class="HOEnZb"><font color="#888888">--<br>
Erk<br>
Le gouvernement représentatif n'est pas la démocratie --<br>
<a href="http://www.le-message.org" target="_blank">http://www.le-message.org</a><br>
</font></span><div class="HOEnZb"><div class="h5">--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</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>
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>
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>
</div></div></blockquote></div><br><br>I don't think this needs to be done very often, and is not worth making a change in CMake for... (So I don't want a patch for it... thanks, anyway) You can easily edit the custom command that CMake already generates for running CPack directly in the Visual Studio gui if you need to add command line arguments for debugging purposes.<br>
<br>Simply right click the "PACKAGE" project, and choose "Properties" -- when the property pages come up, look for "Build Events" and "Post-Build Event" and edit the command line for the post build event.<br>
<br>You can see there's one line in there that calls cpack with something like:<br><br> "C:\Program Files (x86)\CMake 2.8\bin\cpack.exe" -C $(Configuration) --config ./CPackConfig.cmake<br><br>Just add your --verbose and --debug there, and then right click the "PACKAGE" project again, and choose "Project Only > Build Only PACKAGE" to execute the post build command that you just edited...<br>
<br><br>Alternatively, besides some environment differences (which may but don't typically cause final package differences), there should be no reason you can't just run cpack directly from a command prompt in your build tree and get the exact same package.<br>
<br><br>HTH,<br>David<br><br><br>