Skip to content
Snippets Groups Projects
Commit 8dd264e1 authored by Bienchen's avatar Bienchen
Browse files

More CMake documentation

parent 7e90c64b
No related branches found
No related tags found
No related merge requests found
add_custom_target(actions ALL)
add_subdirectory(tests)
pm_action_init()
pm_action(pm-build-rawmodel actions)
pm_action(pm-help actions)
add_subdirectory(tests)
......@@ -26,7 +26,7 @@ into three categories of varying relevance for you:
Best practices for using our home-brew |cmake| functions are found in the
various :file:`CMakeLists.txt` files in the project's directory tree.
Functions For Module Maintenance
Functions For Module/ Action Maintenance
--------------------------------------------------------------------------------
Unit Tests
......@@ -54,7 +54,8 @@ Unit Tests
``MODULE``
Specify the name of the module these tests are made for. Needs to be set,
needs to be a single word.
needs to be a single word. Ends up in ``make help`` as a prefix, nothing
will break if it does not match the name of any existing module.
``Sources``
Describe a set of files hosting unit test code here. If its a wild mix of
......@@ -80,10 +81,36 @@ Unit Tests
``TARGET``
This defines an additional dependency for the unit test.
Actions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. cmake:command:: pm_action
.. code-block:: cmake
pm_action(ACTION action-script
TARGET target)
Add an action to |project|. Actions are scripts called by the ``pm`` launcher
and should all live in the :file:`actions` directory as executable files.
Adding an action means connecting its file with the given target to be copied
to the :file:`libexec` directory. No dedicated ``make`` target will be
created.
The parameters are:
``ACTION``
Name of the action to be added. Should start with ``pm-``. Needs to be an
existing file in the same directory as the invoking :file:`CMakeLists.txt`.
``TARGET``
Provide a ``make`` target to trigger copying the action's script file. The
target has to be created **before** any action may be attached to it.
.. Finding packages
.. -----------------
.. Extending |cmake|
.. -----------------
.. LocalWords: cmake PROMOD
.. LocalWords: cmake PROMOD CMakeLists txt promod unittest codetest xml py
.. LocalWords: libexec
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment