This library contains code that extends and simplifies different operations
for C language based programs.
Revisión | 39d7b8993db3a3d5cc49921cc35884fb8edfef2e (tree) |
---|---|
Tiempo | 2017-02-25 21:14:54 |
Autor | s.gusarov |
Commiter | s.gusarov |
Refactoring: buildinfo renamed to build_info
@@ -11,7 +11,7 @@ | ||
11 | 11 | |
12 | 12 | build |
13 | 13 | |
14 | -buildinfo/include/ctools/version_info.h | |
14 | +build_info/include/ctools/version_info.h | |
15 | 15 | include/ctools/trace_bcc.h |
16 | 16 | |
17 | 17 | libctools_README.pdf |
@@ -1,4 +1,4 @@ | ||
1 | -d984a2a4b7a474ad7cb25a7d374d75fd4e758fa0 cmake/cmake_tools | |
1 | +d316064b2db0c5323048e49447db0f9a80723764 cmake/cmake_tools | |
2 | 2 | 5013d507802becd2c434d4dbdafad45c3da5ef23 include/ctools/std/msinttypes |
3 | -07c40b2f37f1e1a850751747ac9674200da49c37 pyrepo | |
3 | +b97ab65c7f1d00796a67e3e5d89339576b11b7c3 pyrepo | |
4 | 4 | 2988e980fbc2252fa4290b608517d4ae25cd9a46 tests/unity |
@@ -20,8 +20,8 @@ | ||
20 | 20 | |
21 | 21 | include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_tools/tools/python_binary.cmake) |
22 | 22 | |
23 | -execute_process(COMMAND ${CMT_PYTHON_BINARY} ${CMAKE_CURRENT_LIST_DIR}/pyrepo/gen_buildinfo.py | |
24 | - "CT" ${CMAKE_CURRENT_LIST_DIR}/buildinfo/include/ctools | |
23 | +execute_process(COMMAND ${CMT_PYTHON_BINARY} ${CMAKE_CURRENT_LIST_DIR}/pyrepo/gen_build_info.py | |
24 | + "CT" ${CMAKE_CURRENT_LIST_DIR}/build_info/include/ctools | |
25 | 25 | ) |
26 | 26 | |
27 | 27 | if (NOT PROJECT_NAME AND NOT CT_STANDALONE_BUILD) |
@@ -68,13 +68,13 @@ | ||
68 | 68 | |
69 | 69 | file(GLOB_RECURSE INC1 src/*.h) |
70 | 70 | file(GLOB_RECURSE INC2 include/*.h) |
71 | -file(GLOB_RECURSE INC3 buildinfo/include/*.h) | |
71 | +file(GLOB_RECURSE INC3 build_info/include/*.h) | |
72 | 72 | |
73 | 73 | set(SOURCES ${SRCS1} ${INC1} ${INC2} ${INC3}) |
74 | 74 | |
75 | 75 | include_directories(include) |
76 | 76 | include_directories(src) |
77 | -include_directories(buildinfo/include) | |
77 | +include_directories(build_info/include) | |
78 | 78 | |
79 | 79 | set(LIBRARY_OUTPUT_PATH ${CT_BIN_OUTPUT_PATH}) |
80 | 80 |
@@ -102,7 +102,7 @@ | ||
102 | 102 | There are 4 ways of how the library can be used: |
103 | 103 | |
104 | 104 | * Building is not taking place. A project that is going to use ctools |
105 | - should worry about a building process. include and buildinfo/include directories should be passed to the compiler | |
105 | + should worry about a building process. include and build_info/include directories should be passed to the compiler | |
106 | 106 | as directories of headers files. All the modules from src and its subdirectories should be |
107 | 107 | linked to the output binary (if it is required). In some cases preprocessor definitions |
108 | 108 | should be set up to choose mode of various subsystems. |
@@ -98,7 +98,7 @@ | ||
98 | 98 | Существует 4 варианта использования: |
99 | 99 | |
100 | 100 | * Сборка не осуществляется. Сборкой должен заниматься тот проект, |
101 | - который использует эту библиотеку. Для этого он должен указать пути для поиска заголовочных файлов include и buildinfo/include. | |
101 | + который использует эту библиотеку. Для этого он должен указать пути для поиска заголовочных файлов include и build_info/include. | |
102 | 102 | Линковать все модули из src и подкаталогов src (если таковые нужны). Может потребоваться определение |
103 | 103 | препроцессорных идентификаторов для выбора режима работы различных подсистем. |
104 | 104 | По мере развития библиотеки этот вариант сборки нужно сопровождать. Вся актуальная информация может браться из файлов |
@@ -0,0 +1,1 @@ | ||
1 | +0 | |
\ No newline at end of file |
@@ -0,0 +1,1 @@ | ||
1 | +1 | |
\ No newline at end of file |
@@ -0,0 +1,26 @@ | ||
1 | +/* | |
2 | + * @author Sergey Gusarov <laborer2008 (at) gmail.com> | |
3 | + * @section LICENSE | |
4 | + * This Source Code Form is subject to the terms of the Mozilla Public | |
5 | + * License, v. 2.0. If a copy of the MPL was not distributed with this | |
6 | + * file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
7 | + * | |
8 | + * @section DESCRIPTION | |
9 | + * This file should be process by C/C++ compilers and MS resource compiler | |
10 | + * Do not edit. Automatically generated file | |
11 | + */ | |
12 | + | |
13 | +#pragma once | |
14 | + | |
15 | +#include <ctools/std/stdbool.h> | |
16 | +#include <ctools/version.h> | |
17 | + | |
18 | + | |
19 | +#define {prefix}_MAJOR_VERSION {major_version} | |
20 | +#define {prefix}_MINOR_VERSION {minor_version} | |
21 | + | |
22 | +#define {prefix}_BUILD_REVISION {rev} | |
23 | +#define {prefix}_INTERNAL_BUILD {is_internal} | |
24 | + | |
25 | +#define {prefix}_K_VERSION\ | |
26 | + CT_VER_STR_DOT({prefix}_MAJOR_VERSION, {prefix}_MINOR_VERSION, {prefix}_BUILD_REVISION) |
@@ -1,1 +0,0 @@ | ||
1 | -0 | |
\ No newline at end of file |
@@ -1,1 +0,0 @@ | ||
1 | -1 | |
\ No newline at end of file |
@@ -1,26 +0,0 @@ | ||
1 | -/* | |
2 | - * @author Sergey Gusarov <laborer2008 (at) gmail.com> | |
3 | - * @section LICENSE | |
4 | - * This Source Code Form is subject to the terms of the Mozilla Public | |
5 | - * License, v. 2.0. If a copy of the MPL was not distributed with this | |
6 | - * file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
7 | - * | |
8 | - * @section DESCRIPTION | |
9 | - * This file should be process by C/C++ compilers and MS resource compiler | |
10 | - * Do not edit. Automatically generated file | |
11 | - */ | |
12 | - | |
13 | -#pragma once | |
14 | - | |
15 | -#include <ctools/std/stdbool.h> | |
16 | -#include <ctools/version.h> | |
17 | - | |
18 | - | |
19 | -#define {prefix}_MAJOR_VERSION {major_version} | |
20 | -#define {prefix}_MINOR_VERSION {minor_version} | |
21 | - | |
22 | -#define {prefix}_BUILD_REVISION {rev} | |
23 | -#define {prefix}_INTERNAL_BUILD {is_internal} | |
24 | - | |
25 | -#define {prefix}_K_VERSION\ | |
26 | - CT_VER_STR_DOT({prefix}_MAJOR_VERSION, {prefix}_MINOR_VERSION, {prefix}_BUILD_REVISION) |
@@ -22,7 +22,7 @@ | ||
22 | 22 | |
23 | 23 | common_clean.clean() |
24 | 24 | |
25 | - fs.removeFile(os.path.join(parentDir, 'buildinfo', 'include', 'ctools', 'version_info.h')) | |
25 | + fs.removeFile(os.path.join(parentDir, 'build_info', 'include', 'ctools', 'version_info.h')) | |
26 | 26 | fs.removeFile(os.path.join(parentDir, 'include', 'ctools', 'trace_bcc.h')) |
27 | 27 | fs.cleanDir(os.path.join(parentDir, 'build', 'runners')) |
28 | 28 |
@@ -78,10 +78,10 @@ | ||
78 | 78 | file(GLOB_RECURSE UNITY_SRC unity/src/*.c) |
79 | 79 | |
80 | 80 | |
81 | -set(TESTS_BUILDINFO_INCLUDE_DIR "../buildinfo/include/ctools") | |
81 | +set(TESTS_BUILD_INFO_INCLUDE_DIR "../build_info/include/ctools") | |
82 | 82 | |
83 | -file(GLOB TESTS_INCLUDE "${TESTS_BUILDINFO_INCLUDE_DIR}/*.h") | |
84 | -generateTest("${TESTS_INCLUDE}" "buildinfo") | |
83 | +file(GLOB TESTS_INCLUDE "${TESTS_BUILD_INFO_INCLUDE_DIR}/*.h") | |
84 | +generateTest("${TESTS_INCLUDE}" "build_info") | |
85 | 85 | |
86 | 86 | |
87 | 87 | set(TESTS_INCLUDE_DIR "../include/ctools") |
@@ -0,0 +1,43 @@ | ||
1 | +/* | |
2 | + * @author Sergey Gusarov <laborer2008 (at) gmail.com> | |
3 | + * @section LICENSE | |
4 | + * This Source Code Form is subject to the terms of the Mozilla Public | |
5 | + * License, v. 2.0. If a copy of the MPL was not distributed with this | |
6 | + * file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
7 | + * | |
8 | + * @section DESCRIPTION | |
9 | + * | |
10 | + */ | |
11 | + | |
12 | +#include "tests/unity_headers.h" | |
13 | + | |
14 | +#include <ctools/unused.h> | |
15 | +#include <ctools/version_info.h> | |
16 | + | |
17 | + | |
18 | +void setUp(void) | |
19 | +{ | |
20 | +} | |
21 | + | |
22 | +void tearDown(void) | |
23 | +{ | |
24 | +} | |
25 | + | |
26 | +void testCompile(void) | |
27 | +{ | |
28 | + const int kMajorVersion = CT_MAJOR_VERSION; | |
29 | + const int kMinorVersion = CT_MINOR_VERSION; | |
30 | + const int kBuildRevision = CT_BUILD_REVISION; | |
31 | + | |
32 | + const bool kInternalBuild = CT_INTERNAL_BUILD; | |
33 | + | |
34 | + const char* const kVersion = CT_K_VERSION; | |
35 | + | |
36 | + CT_UNUSED(kMajorVersion); | |
37 | + CT_UNUSED(kMinorVersion); | |
38 | + CT_UNUSED(kBuildRevision); | |
39 | + | |
40 | + CT_UNUSED(kInternalBuild); | |
41 | + | |
42 | + CT_UNUSED(kVersion); | |
43 | +} |
@@ -1,43 +0,0 @@ | ||
1 | -/* | |
2 | - * @author Sergey Gusarov <laborer2008 (at) gmail.com> | |
3 | - * @section LICENSE | |
4 | - * This Source Code Form is subject to the terms of the Mozilla Public | |
5 | - * License, v. 2.0. If a copy of the MPL was not distributed with this | |
6 | - * file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
7 | - * | |
8 | - * @section DESCRIPTION | |
9 | - * | |
10 | - */ | |
11 | - | |
12 | -#include "tests/unity_headers.h" | |
13 | - | |
14 | -#include <ctools/unused.h> | |
15 | -#include <ctools/version_info.h> | |
16 | - | |
17 | - | |
18 | -void setUp(void) | |
19 | -{ | |
20 | -} | |
21 | - | |
22 | -void tearDown(void) | |
23 | -{ | |
24 | -} | |
25 | - | |
26 | -void testCompile(void) | |
27 | -{ | |
28 | - const int kMajorVersion = CT_MAJOR_VERSION; | |
29 | - const int kMinorVersion = CT_MINOR_VERSION; | |
30 | - const int kBuildRevision = CT_BUILD_REVISION; | |
31 | - | |
32 | - const bool kInternalBuild = CT_INTERNAL_BUILD; | |
33 | - | |
34 | - const char* const kVersion = CT_K_VERSION; | |
35 | - | |
36 | - CT_UNUSED(kMajorVersion); | |
37 | - CT_UNUSED(kMinorVersion); | |
38 | - CT_UNUSED(kBuildRevision); | |
39 | - | |
40 | - CT_UNUSED(kInternalBuild); | |
41 | - | |
42 | - CT_UNUSED(kVersion); | |
43 | -} |
@@ -28,7 +28,7 @@ | ||
28 | 28 | return os.path.join(scriptDir, 'src') |
29 | 29 | |
30 | 30 | def kTestsBuildInfoDir(): |
31 | - return os.path.join(scriptDir, 'buildinfo') | |
31 | + return os.path.join(scriptDir, 'build_info') | |
32 | 32 | |
33 | 33 | def kCtoolsBuildDir(): |
34 | 34 | return os.path.join(kParentDir(), 'build') |