Hello,

I often find it very useful to run CMake scripts of the form "cmake -P 
script-name arg1 arg2 ..." as a cross-platform scripting solution that doesn't 
rely on Perl, Python, etc.  One major limitation is that CMake continues to 
parse all arguments after the script name.  For example, if arg1 is "-i" then 
CMake will enter wizard mode before executing the script, and options such as 
"-D", "-G" and "-L" will be parsed and removed from the command-line by CMake.  
The current behavior limits the flexibility of CMake's script mode by making it 
impossible to pass arbitrary options to be parsed directly by the script.

It would be great if I could somehow specify "cmake -P script-name -- arg1 arg2 
..." to tell CMake to stop parsing all subsequent arguments while still placing 
arg1, arg2, etc. in the CMAKE_ARGVn variables.  If the "--" flag is potentially 
problematic and may pose compatibility problems, perhaps another syntax can be 
adopted, such as "cmake -PP script-name arg1 arg2 ..." where -P is doubled.

Is this something that can be easily implemented?

Best,

Eskandar
--

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

Reply via email to