[CMake] Forwarding parameters to cmake through cmake-gui

physhh . physhh at gmail.com
Fri Nov 1 12:33:57 EDT 2013


Yes but not all cmake projects which I build are mine. So i would still
have to modify a CMakeLists from someone else, which is in my opinion a bad
thing.
When you have the possiblity to inject cmake stuff without modifying the
project itself you can implement a clean separation between project
dependencies and how/where to find those.


On Fri, Nov 1, 2013 at 5:28 PM, John Drescher <drescherjm at gmail.com> wrote:

> > +1 for updating cmake-gui to work equally to ccmake
> >
> > But my opinion regarding CMAKE_MODULE_PATH is different. The problem is
> that
> > alot of the default find-modules don't work because the dependency is
> not in
> > the location where the find-module expects it. Currently there are only
> two
> > workarounds:
> > - Change the find-module directly so it works in the local environment
> > - Change the CMakeLists.txt of the project - which is bad because it's
> just
> > a LOCAL problem and the CMakeLists should be mostly independent of the
> > environment.
> >
> > With the command-line option it's possible to setup a custom cmake-gui
> batch
> > file once per computer which sets e.g. the CMAKE_MODULE_PATH to a
> directory
> > with customized find modules. If one doesn't want to use custom find
> modules
> > that's fine too but I think everyone should have the option to place
> > dependent libraries wherever she/he wants.
> >
>
> For these kind of things I use environment variables in my
> CMakeLists.txt. If the environment variable is set I use it. If not I
> use the default behavior.
>
> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131101/3e53b8d5/attachment.htm>


More information about the CMake mailing list