Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
IHTACMakeCommon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IHTA
CMake
IHTACMakeCommon
Commits
53efe628
Commit
53efe628
authored
2 years ago
by
Pascal Palenda
Browse files
Options
Downloads
Patches
Plain Diff
Add doc for ihta_add_library
parent
1be31d66
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/IhtaAddLibrary.cmake
+92
-9
92 additions, 9 deletions
src/IhtaAddLibrary.cmake
with
92 additions
and
9 deletions
src/IhtaAddLibrary.cmake
+
92
−
9
View file @
53efe628
...
@@ -3,23 +3,106 @@ include_guard ()
...
@@ -3,23 +3,106 @@ include_guard ()
#[=======================================================================[.rst:
#[=======================================================================[.rst:
..command:: ihta_add_library
..command:: ihta_add_library
Macro to generate doxygen documentation with custom logo and style sheet.
Macro to create a library including most of the common settings/setups.
This macro also allows to create a unit test executable with the same command.
In most cases, after this command only link libraries have to be set and
optionally install directives.
Note: when using generated export headers from cmake, these have to be added
to the lib and test targets manually.
::
::
build_doc(
ihta_add_library(
SOURCES <documentation-folder...>
NAME <library-name>
[README_MAINPAGE <readme-file-for-main-page>]
SOURCES <library-source-files...>
[COLOR_STYLE <css-style-sheet>]
[LIBRARY_TYPE <STATIC|SHARED>]
[LOGO <logo-file>]
[NAMESPACE <target-alias-namespace>]
[ADD_DEV_SECTION]
[IDE_FOLDER <folder-name-for-IDE>]
[SIDEBAR_ONLY]
[INCLUDE_DIR <library-include-dir>]
[INSTALL_INCLUDE_DIR <library-install-include-dir>]
[OUT_VAR <output-library-target-name-variable>]
[TEST_SOURCES <test-source-files...>]
[TEST_INTERNALS]
[SRC_DIR <library-source-dir>]
[OBJECT_LIB_POSTFIX <object-lib-postfix>]
)
)
.. variable::
SIDEBAR_ONLY
.. variable::
NAME
Specifies, that the `doxygen-awesome-css` sidebar ony style should be used.
Specifies, that the `doxygen-awesome-css` sidebar ony style should be used.
.. variable:: SOURCES
Source files for the library.
If you are using `target_sources` you can use `""` as the sources.
Todo: test this!
.. variable:: LIBRARY_TYPE
Optionally specify the library type. Either `STATIC` or `SHARED`.
If not specified, this macro behaves similarly to `add_library` in that it
assumes the type to be `STATIC` unless `BUILD_SHARED_LIBS` is turned on.
.. variable:: NAMESPACE
Optional namespace for the alias target of the library.
At least NAMESPACE or IDE_FOLDER must be given. If only one is given, the other
one will be set to the value of the given one.
.. variable:: IDE_FOLDER
Optional IDE folder for the library target(s).
At least NAMESPACE or IDE_FOLDER must be given. If only one is given, the other
one will be set to the value of the given one.
.. variable:: INCLUDE_DIR
Optionally specify the libraries include directory.
Default is `${CMAKE_CURRENT_SOURCE_DIR}/include`.
.. variable:: INSTALL_INCLUDE_DIR
Optionally specify the install include directory for the library.
If not specified, the install expects the same include folder structure as in the
libraries include folder.
.. variable:: OUT_VAR
Variable name into which the library target name will be set.
This can be useful when testing the internals and an object library is created,
onto which most further settings must be applied.
.. variable:: TEST_SOURCES
Sources files for the optional unit test executable.
.. variable:: TEST_INTERNALS
Specifies if the unit test should be able to test the internals of the library.
Under the hood, this then creates an object library for both the library and
the test to save on compilation time.
See `cmake_registertest <https://github.com/pthom/cmake_registertest>`_
.. variable:: SRC_DIR
Optionally specify the libraries source directory.
Default is `${CMAKE_CURRENT_SOURCE_DIR}/src`.
This should be given if TEST_INTERNALS is given and one wants to test the internals.
.. variable:: OBJECT_LIB_POSTFIX
Optionally specify a postfix for the object library if TEST_INTERNALS is specified.
The default is `_object`.
#]=======================================================================]
#]=======================================================================]
macro
(
ihta_add_library
)
macro
(
ihta_add_library
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment