[CMake] configuring cmake using program options?

2012-09-10 Thread Witold E Wolski
Hi,

When calling ccmake I can configure a variable Mylib_DIR (library location)/

However, I would like to run the configuration and build process in bash
script (its an out of source build). Therefore I am trying to configure
everything on the command line using the -D switch:

cmake -G "Eclipse CDT4 - Unix Makefiles"
-DMylib_DIR=/home/witold/prog/OpenMS/gitsvn ../mapdiv

However, when starting ccmake the Mylib_DIR is still set to some default
other default variable.

cheers
Wolski
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] configuring cmake using program options?

2012-09-10 Thread J Decker
blow away cmakecache.txt and try again.
That is probably cached if it's an option you can set in ccmake or cmake-gui

On Mon, Sep 10, 2012 at 3:08 AM, Witold E Wolski  wrote:
> Hi,
>
> When calling ccmake I can configure a variable Mylib_DIR (library location)/
>
> However, I would like to run the configuration and build process in bash
> script (its an out of source build). Therefore I am trying to configure
> everything on the command line using the -D switch:
>
> cmake -G "Eclipse CDT4 - Unix Makefiles"
> -DMylib_DIR=/home/witold/prog/OpenMS/gitsvn ../mapdiv
>
> However, when starting ccmake the Mylib_DIR is still set to some default
> other default variable.
>
> cheers
> Wolski
>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] configuring cmake using program options?

2012-09-10 Thread Yuri Timenkov
I think on contrary, the value passed from command line wasn't saved into
cache. You should do it manually in your CMakeLists.txt, like
set(Mylib_DIR "${Mylib_DIR}" CACHE PATH "Path to something")

But variables with _DIR suffix are usually set by find_package command, I'm
not sure about expected behavior in this case.

On Mon, Sep 10, 2012 at 2:40 PM, J Decker  wrote:

> blow away cmakecache.txt and try again.
> That is probably cached if it's an option you can set in ccmake or
> cmake-gui
>
> On Mon, Sep 10, 2012 at 3:08 AM, Witold E Wolski 
> wrote:
> > Hi,
> >
> > When calling ccmake I can configure a variable Mylib_DIR (library
> location)/
> >
> > However, I would like to run the configuration and build process in bash
> > script (its an out of source build). Therefore I am trying to configure
> > everything on the command line using the -D switch:
> >
> > cmake -G "Eclipse CDT4 - Unix Makefiles"
> > -DMylib_DIR=/home/witold/prog/OpenMS/gitsvn ../mapdiv
> >
> > However, when starting ccmake the Mylib_DIR is still set to some default
> > other default variable.
> >
> > cheers
> > Wolski
> >
> >
> > --
> >
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the CMake FAQ at:
> > http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.cmake.org/mailman/listinfo/cmake
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake