Hi David,<br>
<br>
The documentation for add_custom_command seems to imply that it will
only add a build command and not replace a build command. The way that I
interpret this is that cmake will generate a vcproj that executes my
custom build command (gmake) that I add using add_custom_command but will also attempt to build the project
in the normal Visual Studio fashion by calling the C++ compiler
(CL.exe) directly.<br>
<br>
Am I misreading it?<br>
<br>
Mark<br>
<br><br><div class="gmail_quote">On Fri, Dec 11, 2009 at 10:14 AM, David Cole <span dir="ltr"><<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You can do what you want with add_custom_command and add_custom_target. Have you read about those CMake commands...?<br><br><div><a href="http://cmake.org/cmake/help/cmake-2-8-docs.html#command:add_custom_command" target="_blank">http://cmake.org/cmake/help/cmake-2-8-docs.html#command:add_custom_command</a></div>
<div><a href="http://cmake.org/cmake/help/cmake-2-8-docs.html#command:add_custom_target" target="_blank">http://cmake.org/cmake/help/cmake-2-8-docs.html#command:add_custom_target</a><br><div><br></div><div><br></div><div>
HTH,</div><div>David</div>
<div><br></div><div><br><div class="gmail_quote"><div><div></div><div class="h5">On Fri, Dec 11, 2009 at 9:17 AM, Mark Jones <span dir="ltr"><<a href="mailto:mark.jones1112@gmail.com" target="_blank">mark.jones1112@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
If I have a build system in place (that uses gmake) that I am already comfortable with and would just like to use cmake to create Visual Studio (or XCode) projects that simply have release and debug targets that call gmake for me, can I do that with cmake? Or, does cmake always generate a makefile too that is used by the projects that it creates?<br>
<br>In other words, I want cmake to generate something like the following in the vcproj file:<br><br> <Configurations><br> <Configuration<br> Name="debug|Win32"<br> OutputDirectory="log"<br>
IntermediateDirectory="log"<br> ConfigurationType="0"<br> ><br> <Tool<br> Name="VCNMakeTool"<br> BuildCommandLine="gmake DEBUG=1 build"<br>
ReBuildCommandLine="gmake DEBUG=1 rebuild"<br> CleanCommandLine="gmake DEBUG=1 clean"<br> Output=""<br> PreprocessorDefinitions="_DEBUG;DEBUG"<br>
[snip]<br> /><br> </Configuration><br><br>and I don't want it to write out any makefile at all as I want gmake to use the makefile that I already have in place.<br><br>Also, I'd like to do the same kind of thing with XCode project generation and I'd like to know if that is possible too.<br>
<br>If it always generates a makefile too, I imagine a workaround would be to let cmake create the vcproj file that builds using the cmake generated makefile, but then tell cmake to generate the makefile so that it then calls gmake on my already existing makefile, but that is not ideal since it would be an unnecessary step in the build process.<br>
<br>Thanks,<br><font color="#888888">Mark<br><br>
</font><br></div></div><div class="im">_______________________________________________<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></blockquote></div><br></div></div>
</blockquote></div><br>