[CMake] cmake-gui: compile when I hit the generate button
ChristophK
christoph at kobenetz.de
Sat Mar 9 12:22:15 EST 2013
Hi David,
thank you very much for your quick answer.
On Sat, 9 Mar 2013 10:57:29 -0500
David Cole <dlrdave at aol.com> wrote:
> It's one of those features which, if implemented, would lead to a
> bunch more work than it sounds like at first.
>
> For example, what's the best way to indicate build progress? What
> should happen if the native build tool crashes? How can you interrupt a
> build that's taking too long?
>
> All these things are already handled external to CMake by all the
> native tools. Initiating the build from CMake would suddenly make all
> those things "CMake's problem..."
That's a reasonable point, I see it.
> Initiating the build is not hard: just call "cmake --build ."
It's not about beeing hard - but wait: At this point the build IS being
done by cmake - correct me if I'm wrong. Is there really so much
difference if this code is invoked from the gui or the command line?
Back to the "not hard" - I don't think it's hard to throw up the
console, enter the right directory and invoke a program with some
command line arguments. But it's work that needs to be done and far more
complicated than just clicking a compile-button. And it might be hard
for other people.
It's about beeing as simple as possible for the person compiling the
program, who often might not be a developer.
I made a small widows batch-script that invokes the build from the
command line right after closing cmake-gui:
----
@echo off
if not exist build (
echo Creating directory "build"
mkdir build
)
cd build
echo Starting CMake-GUI
cmake-gui
if exist Makefile (
echo Makefile found, starting build process ...
cmake --build .
) else (
echo no Makefile, not starting build process.
)
cd ..
pause
----
Not really beautiful but better than "cmd.exe" and all the typing.
Regards
Christoph
More information about the CMake
mailing list