update parts of doc
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
Customizing CMake modules
|
||||
=========================
|
||||
|
||||
The ``update.py`` script assembles modules listed in ``autocmake.cfg`` into
|
||||
The ``update.py`` script assembles modules listed in ``autocmake.yml`` into
|
||||
``CMakeLists.txt``. Those that are fetched from the web are placed inside
|
||||
``downloaded/``. You have several options to customize downloaded CMake
|
||||
modules:
|
||||
@ -22,7 +22,7 @@ Adapt local copies of CMake modules
|
||||
|
||||
A slightly better solution is to download the CMake modules that you wish you customize
|
||||
to a separate directory (e.g. ``custom/``) and source the customized CMake
|
||||
modules in ``autocmake.cfg``. Alternatively you can serve your custom modules
|
||||
modules in ``autocmake.yml``. Alternatively you can serve your custom modules
|
||||
from your own http server.
|
||||
|
||||
|
||||
@ -34,19 +34,30 @@ the branched customized versions. This will make it easier for you
|
||||
to stay up-to-date with upstream development.
|
||||
|
||||
|
||||
Overriding defaults
|
||||
Overriding settings
|
||||
-------------------
|
||||
|
||||
Some modules use interpolations to set defaults, see for instance
|
||||
https://github.com/coderefinery/autocmake/blob/master/modules/boost/boost.cmake#L33-L36.
|
||||
These can be modified within ``autocmake.cfg``, e.g.:
|
||||
https://github.com/coderefinery/autocmake/blob/master/test/boost_libs/cmake/autocmake.cfg#L9
|
||||
If you source a module which contains directives such as
|
||||
``define``,
|
||||
``docopt``,
|
||||
``export``, or
|
||||
``fetch``, and you wish to modify those,
|
||||
then you can override these settings in ``autocmake.yml``.
|
||||
Settings in ``autocmake.yml`` take precedence over
|
||||
settings imported by a sourced module.
|
||||
|
||||
As an example consider the Boost module which defines and uses
|
||||
interpolation variables ``major``, ``minor``, and ``patch``, see
|
||||
https://github.com/coderefinery/autocmake/blob/master/modules/boost/boost.cmake#L52-L54.
|
||||
|
||||
The recommended way to customize these is in ``autocmake.yml``, e.g.:
|
||||
https://github.com/coderefinery/autocmake/blob/master/test/boost_libs/cmake/autocmake.yml#L12-L17.
|
||||
|
||||
|
||||
Create own CMake modules
|
||||
------------------------
|
||||
|
||||
Of course you can also create own modules and source them in ``autocmake.cfg``.
|
||||
Of course you can also create own modules and source them in ``autocmake.yml``.
|
||||
|
||||
|
||||
Contribute customizations to the "standard library"
|
||||
|
Reference in New Issue
Block a user