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">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">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">On Fri, Dec 11, 2009 at 9:17 AM, Mark Jones <span dir="ltr"><<a href="mailto:mark.jones1112@gmail.com">mark.jones1112@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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>_______________________________________________<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></blockquote></div><br></div></div>