Discussion:
[CMake] How to make ccmake automatic run to select all modules in a script?
hce
2013-03-02 08:49:47 UTC
Permalink
Hi,

I am writing a Linux bash script to run cmake, ccmake and cpack
automatically. The problem for ccmake is that is an interactive interface.
Is it possible to specify ccmake in command line to select all modules and
to run in a script without push buttons?

Please give an example how to run ccmake to switch all module on and config
in a command line.

Thank you.

Kind regards.



--
View this message in context: http://cmake.3232098.n2.nabble.com/How-to-make-ccmake-automatic-run-to-select-all-modules-in-a-script-tp7583458.html
Sent from the CMake mailing list archive at Nabble.com.
Jean-Christophe Fillion-Robin
2013-03-02 08:56:17 UTC
Permalink
Hi Jupiter,

You could look at
http://www.cmake.org/cmake/help/v2.8.10/cmake.html#section_Options

And more particularly at:
http://www.cmake.org/cmake/help/v2.8.10/cmake.html#opt:-Dvar:typevalue

Hth
Jc
Post by hce
Hi,
I am writing a Linux bash script to run cmake, ccmake and cpack
automatically. The problem for ccmake is that is an interactive interface.
Is it possible to specify ccmake in command line to select all modules and
to run in a script without push buttons?
Please give an example how to run ccmake to switch all module on and config
in a command line.
Thank you.
Kind regards.
--
http://cmake.3232098.n2.nabble.com/How-to-make-ccmake-automatic-run-to-select-all-modules-in-a-script-tp7583458.html
Sent from the CMake mailing list archive at Nabble.com.
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.cmake.org/Wiki/CMake_FAQ
http://www.cmake.org/mailman/listinfo/cmake
--
+1 919 869 8849
hce
2013-03-02 11:22:22 UTC
Permalink
Thanks Jean-Christophe. I did read the document before, but still could not
figure out how to switch all modules from default OFF to ON in ccmake
command line, and still could not figure out how to run ccmake without
interactive button push c-> configure, q-> quit.

I looked at ccmake --help, I guess the -D may be the relavent option to
switch a module to ON, but could not understand how to use it. Sorry for my
dumb, appreciate an example.

-D <var>:<type>=<value>

Thank you.

Kind regards.

j



--
View this message in context: http://cmake.3232098.n2.nabble.com/How-to-make-ccmake-automatic-run-to-select-all-modules-in-a-script-tp7583458p7583461.html
Sent from the CMake mailing list archive at Nabble.com.
Jean-Christophe Fillion-Robin
2013-03-02 12:22:13 UTC
Permalink
Hi Jupiter,

"ccmake" and "cmake" are two different executables.

See http://www.cmake.org/cmake/help/runningcmake.html for details.


If you would like to enable / disable an option from the command line, you
could do:

cd /path/to/build
./cmake -DNAMEOFOPTION:BOOL=ON /path/to/source

Hth
Jc
Post by hce
Thanks Jean-Christophe. I did read the document before, but still could not
figure out how to switch all modules from default OFF to ON in ccmake
command line, and still could not figure out how to run ccmake without
interactive button push c-> configure, q-> quit.
I looked at ccmake --help, I guess the -D may be the relavent option to
switch a module to ON, but could not understand how to use it. Sorry for my
dumb, appreciate an example.
-D <var>:<type>=<value>
Thank you.
Kind regards.
j
--
http://cmake.3232098.n2.nabble.com/How-to-make-ccmake-automatic-run-to-select-all-modules-in-a-script-tp7583458p7583461.html
Sent from the CMake mailing list archive at Nabble.com.
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.cmake.org/Wiki/CMake_FAQ
http://www.cmake.org/mailman/listinfo/cmake
--
+1 919 869 8849
Loading...