[cmake-developers] [PATCH] command line shortcuts for cmake

Alexander Neundorf neundorf at kde.org
Sun Oct 1 17:12:59 EDT 2006


Hi,

attached you can find a patch which adds the ability to cmake to read 
project-defined translations, so that e.g. instead of 
-DCMAKE_INSTALL_PREFIX:PATH=/opt/foo simply --prefix=/opt/foo can be used.

In translationstest.tar.gz you can find a simple testcase, it translates 
CMAKE_INSTALL_PREFIX to --prefix.
I.e. you can do "cmake <dir> --prefix=/opt/foo" and it will set the install 
prefix accordingly.

Translations are defined by creating a file named "CMakeArguments.txt" in 
CMAKE_SOURCE_DIR. This file has to be in the CMakeCache.txt format. If this 
file exists it is parsed by CMake, and all arguments starting with "--" are 
looked up in this translation cache.

Comments ?

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: argtranslations.patch
Type: text/x-diff
Size: 7422 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20061001/720c61eb/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: translationtest.tar.gz
Type: application/x-tgz
Size: 357 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20061001/720c61eb/attachment.bin>


More information about the cmake-developers mailing list