[CMake] Basic question about CMAKE_MAKE_PROGRAM

Brad King brad.king at kitware.com
Mon Jul 11 09:28:31 EDT 2005


Sylvain PRAT wrote:
> Just a basic question: what is CMAKE_MAKE_PROGRAM used for into cmake ? 
> Anyway, why should have visual c++ “devenv” program to be able to 
> generate visual c++ projects ?

It is used to know what program to call to drive an actual build after 
CMake generates a build system.

> In fact, I want to use codeblocks (which imports visual projects) but 
> cmake complaint about the CMAKE_MAKE_PROGRAM. If I change this to the 
> codeblocks executable, I’ve some errors (Unable to find executable for 
> try run), as it seems that cmake try to use the development environment 
> to build the files !? How must I proceed ?

For a try-compile or try-run CMake needs to use the same environment to 
build the source files as that which will be used to build the generated 
project.  Otherwise the results could be inconsistent.

You probably cannot use the codeblocks executable unless it behaves 
exactly like devenv.  The VS project file generator is meant to work 
with the native VS tools.

-Brad


More information about the CMake mailing list