[CMake] BUILD_COMMAND having a hard time getting usable command lines

J Decker d3ck0r at gmail.com
Mon Nov 28 14:43:33 EST 2011


So the idea was, to make the build process a single click (or couple)
or at least a single application to build.  Since CMake knows how to
build a project, it became easier to maintain a cmakelists.txt which
does the build than a batch file...

So my top most level project now is a series of targets which do a
build and an install and possibly additional commands between each
target.  (Some project have deploy commands that build other scripts
that get used later in the build).

By adding some options to do the build command at the end of the
script (especially if those options default as off) I figured I could
trigger a build.

Yes; If I do 'cmake -G 'SomeGenerator' -DGENERATOR_BUILD_ALL_NOW=1'
then in a clean directory, this fails to actually to the build,
repeating this command allows the project build to commence.

If I don't use the command line with the custom knowledge that things
exist in a cmakelists; and I use 'cmake-gui' then point it at the
sources, click 'configure' and the options are read, and hmm I guess I
could still just configure and not generate and set the build now
option; then the build can happen automatically from just knowing
cmake, not the environment specific mingw32-make.exe or wmake or
devenv or whatever


More information about the CMake mailing list