[CMake] Visual Studio command line from CMake

Rob McDonald rob.a.mcdonald at gmail.com
Wed Jan 8 18:53:56 EST 2014


Short version:

Does anyone have an elegant way to launch the visual studio command line
from within CMake?

James Bigler asked essentially this question back in March of 2011.  David
responded with a link to a Blog entry, but I haven't figured out how to
translate that into something that works.

The 'vcvarsall.bat' program that comes with Visual Studio will launch the
command line with the full environment set.

Once I find vcvarsall, I then need to launch something in it -- and pass
parameters to that thing.  All from within ExternalProject_Add.  For now,
one step at a time...

Long version:

I'm trying to encapsulate the build of FLTK as an ExternalProject in CMake.
 One way or the other, it needs to work for Visual Studio on Windows, and
gcc and llvm on Linux/MacOS.

Although FLTK has a CMake build system, it is currently unmaintained
(broken on at least some platforms), and none of the core FLTK developers
use it, so I don't see this situation improving.

I've got a ./configure based system working for Linux/MacOS.

One of the FLTK developers maintains an unofficial Makefile setup for
FLKT/Visual Studio that must be run from the Visual Studio command prompt.
 Hence my question...

http://seriss.com/people/erco/fltk/tmp/vsnet-makefiles.0.85.zip

Thanks for any help,

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140108/1e54c6b1/attachment.htm>


More information about the CMake mailing list