[CMake] Can cmake generate Visual Studio projects without generating a makefile?

Mark Jones mark.jones1112 at gmail.com
Fri Dec 11 09:17:41 EST 2009


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?

In other words, I want cmake to generate something like the following in the
vcproj file:

    <Configurations>
        <Configuration
            Name="debug|Win32"
            OutputDirectory="log"
            IntermediateDirectory="log"
            ConfigurationType="0"
            >
            <Tool
                Name="VCNMakeTool"
                BuildCommandLine="gmake DEBUG=1 build"
                ReBuildCommandLine="gmake DEBUG=1 rebuild"
                CleanCommandLine="gmake DEBUG=1 clean"
                Output=""
                PreprocessorDefinitions="_DEBUG;DEBUG"
[snip]
            />
        </Configuration>

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.

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.

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.

Thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091211/316c38e2/attachment.htm>


More information about the CMake mailing list