ae2f_docs
Core.cmake.hpp
Go to the documentation of this file.
1/**
2 * @file Core.cmake.hpp
3 * @author ae2f
4 * @brief
5 * @version 0.1
6 * @date 2025-02-11
7 *
8 * @copyright Copyright (c) 2025
9 *
10 */
11
12#include "cmake.hpp"
13
14namespace ___DOC_CMAKE {
15 /// @brief
16 /// When activated, it would generate project with the deaders of cmake utility functions.
17 ///
18 /// Default value is ON.
20
21 /// @brief
22 /// Tell that thou art including cxx for thy project.
23 /// Default value is [OFF].
25
26 /// @brief
27 /// Activating this flag will cause all libraries built as shared libraries.
29
30 /// @brief When activated, it would generate test projects
32
33 /// @brief Pre-defined library prefix.
34 /// @warning Note that value is auto-generated.
35 CACHE STRING ae2f_LIBPREFIX = ae2f_IS_SHARED ? "SHARED" : "STATIC";
36
37 /// @brief The root project source directory.
38 CACHE STRING ae2f_ProjRoot = "${CMAKE_CURRENT_SOURCE_DIR}";
39
40 /// @brief The root binary directory.
41 CACHE STRING ae2f_BinRoot = "${CMAKE_CURRENT_BINARY_DIR}";
42
43 /// @brief
44 /// Set the structure pack for pre-defined structures from interfaces.
45 ///
46 /// If it is set to zero, default structure pack will be preserved.
47 ///
48 /// Default value is 0.
50
51 /// @brief
52 /// Pre-defined global float type. \n
53 /// It is set to float as default.
54 using ae2f_float = float;
55
56 /// @brief
57 /// Makes a Library installable.
58 ///
59 /// @param prm_TarName
60 /// Library name you want.
61 ///
62 /// @param prm_TarPrefix
63 /// [STATIC | SHARED | INTERFACE]
64 ///
65 /// @param prm_includeDir
66 /// The include directory relative to the project CMakeLists.txt
67 ///
68 /// @param prm_namespace
69 /// Namespace (or header root directory after include)
70 ///
71 /// @param ...
72 /// The sources for the project.
74 param prm_TarName,
75 param prm_TarPreFix,
76 param prm_includeDir,
77 param prm_namespace,
78 ...
79 );
80
81 /// @brief
82 /// Makes a Library installable. \n
83 /// Configuration file could be selected here.
84 /// @param prm_TarName
85 /// Library name you want.
86 ///
87 /// @param prm_TarPrefix
88 /// [STATIC | SHARED | INTERFACE]
89 ///
90 /// @param prm_includeDir
91 /// The include directory relative to the project CMakeLists.txt
92 ///
93 /// @param prm_namespace
94 /// Namespace (or header root directory after include)
95 ///
96 /// @param prm_configpath
97 /// The path where the input file for Configuration lies.
98 /// @param ...
99 /// The sources for the project.
101 param prm_TarName,
102 param prm_TarPreFix,
103 param prm_includeDir,
104 param prm_namespace,
105 param prm_configpath,
106 ...
107 );
108
109 /// @brief
110 /// Iterates a directory `prm_TestSourcesDir` and
111 /// Make a test case for every source.
112 ///
113 /// @param prm_LibName
114 /// Base Library name
115 ///
116 /// @param prm_TestSourcesDir
117 /// A directory where the stand-alone test codes locate. \n
118 /// Every sources under that directory must be stand-alone, which means it must not depends on another memory, function, etc.
119 ///
120 /// @param ...
121 /// Additional Libraries if you want
122 ///
123 /// @see ___DOC_CMAKE::ae2f_TEST
125 param prm_LibName,
126 param prm_TestSourcesDir,
127 ...
128 );
129
130 /// @brief
131 /// Generate an interface project for document code for cmake utility functions. \n
132 /// Available when ___DOC_CMAKE::ae2f_DOC is ON.
133 ///
134 /// @param prm_TarName
135 /// Library name you want.
136 ///
137 /// @param prm_includeDir
138 /// Where the documents exist
139 /// The include directory relative to the project CMakeLists.txt
140 ///
141 /// @param prm_namespace
142 /// Namespace (or header root directory after include)
143 ///
144 /// @param ...
145 /// The past documents name
146 /// @see ___DOC_CMAKE::ae2f_CoreLibTent
147 /// @see ___DOC_CMAKE::ae2f_DOC
149 param prm_TarName,
150 param prm_includeDir,
151 param prm_namespace,
152 ...
153 );
154
155 /// @brief
156 /// It will try to fetch the cmake project ae2f-Core like project for Local and Github. \n
157 /// @see ___DOC_CMAKE::ae2f_LibDirGlob is the given path to check. \n
158 ///
159 /// Once the project is in given directory, it will not try to fetch it from internet.
160 /// @param prm_AuthorName
161 /// Author name
162 /// @param prm_TarName
163 /// Target name must be the repository's name.
164 /// @param prm_TagName
165 /// Tag name
167 param prm_AuthorName,
168 param prm_TarName,
169 param prm_TagName
170 );
171}
#define STRING
Definition cmake.hpp:7
#define function
Definition cmake.hpp:9
#define OFF
Definition cmake.hpp:4
#define CACHE
Definition cmake.hpp:6
#define param
Definition cmake.hpp:10
#define ON
Definition cmake.hpp:5
#define option
Definition cmake.hpp:8
CACHE STRING ae2f_BinRoot
The root binary directory.
constexpr unsigned int ae2f_packcount
Set the structure pack for pre-defined structures from interfaces.
float ae2f_float
Pre-defined global float type. It is set to float as default.
option ae2f_DOC
When activated, it would generate project with the deaders of cmake utility functions.
Definition Core.cmake.hpp:8
CACHE STRING ae2f_LIBPREFIX
Pre-defined library prefix.
function ae2f_CoreLibTent(param prm_TarName, param prm_TarPreFix, param prm_includeDir, param prm_namespace,...)
Makes a Library installable.
function ae2f_CoreTestTent(param prm_LibName, param prm_TestSourcesDir,...)
Iterates a directory prm_TestSourcesDir and Make a test case for every source.
function ae2f_CoreUtilityDocTent(param prm_TarName, param prm_includeDir, param prm_namespace,...)
Generate an interface project for document code for cmake utility functions. Available when ___DOC_C...
option ae2f_CXX
Tell that thou art including cxx for thy project. Default value is [OFF].
function ae2f_CoreLibTentConfigCustom(param prm_TarName, param prm_TarPreFix, param prm_includeDir, param prm_namespace, param prm_configpath,...)
Makes a Library installable. Configuration file could be selected here.
option ae2f_IS_SHARED
Activating this flag will cause all libraries built as shared libraries.
option ae2f_TEST
When activated, it would generate test projects.
function ae2f_CoreLibFetch(param prm_AuthorName, param prm_TarName, param prm_TagName)
It will try to fetch the cmake project ae2f-Core like project for Local and Github....
CACHE STRING ae2f_ProjRoot
The root project source directory.