This library contains code that extends and simplifies different operations
for C language based programs.
Revisión | 23a132dd4d5ebf8c03b50de3e7d2e955c8f38006 (tree) |
---|---|
Tiempo | 2017-01-02 11:23:23 |
Autor | s.gusarov |
Commiter | s.gusarov |
New version info generation mechanism
@@ -1,4 +1,4 @@ | ||
1 | 1 | 985ef3f082586ba904dfc648dca417ce0389337d cmake/cmake_tools |
2 | 2 | 5013d507802becd2c434d4dbdafad45c3da5ef23 include/ctools/std/msinttypes |
3 | -406ab938b1d534e1ccf7a0fb48fe9760359eba93 pyrepo | |
3 | +19863895614c1d2ddaf55b3873effddf39d74c4f pyrepo | |
4 | 4 | 7f9f937cd195d8667002e010220f46f6909d5cbe tests/unity |
@@ -21,8 +21,8 @@ | ||
21 | 21 | include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_tools/tools/python_binary.cmake) |
22 | 22 | |
23 | 23 | execute_process(COMMAND ${CMT_PYTHON_BINARY} ${CMAKE_CURRENT_LIST_DIR}/pyrepo/gen_buildinfo.py |
24 | - ${CMAKE_CURRENT_LIST_DIR}/buildinfo/include/ctools/version_info.template | |
25 | - ${CMAKE_CURRENT_LIST_DIR}/buildinfo/include/ctools/version_info.h) | |
24 | + "CT" ${CMAKE_CURRENT_LIST_DIR}/buildinfo/include/ctools | |
25 | +) | |
26 | 26 | |
27 | 27 | if (NOT PROJECT_NAME AND NOT CT_STANDALONE_BUILD) |
28 | 28 | # Pure CMake build(suitable also for IDE's parsers) |
@@ -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,25 @@ | ||
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 | +#define {prefix}_MAJOR_VERSION {major_version} | |
19 | +#define {prefix}_MINOR_VERSION {minor_version} | |
20 | + | |
21 | +#define {prefix}_BUILD_REVISION {rev} | |
22 | +#define {prefix}_INTERNAL_BUILD {is_internal} | |
23 | + | |
24 | +#define {prefix}_K_VERSION\ | |
25 | + CT_VER_STR_DOT({prefix}_MAJOR_VERSION, {prefix}_MINOR_VERSION, {prefix}_BUILD_REVISION) |
@@ -1,23 +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 | - */ | |
11 | - | |
12 | -#pragma once | |
13 | - | |
14 | -#include <ctools/std/stdbool.h> | |
15 | - | |
16 | - | |
17 | -#define CT_LIBRARY_NAME "ctools" | |
18 | - | |
19 | -#define CT_MAJOR_VERSION 0 | |
20 | -#define CT_MINOR_VERSION 1 | |
21 | - | |
22 | -#define CT_BUILD_REVISION {rev} | |
23 | -#define CT_INTERNAL_BUILD {is_internal} |
@@ -11,10 +11,9 @@ | ||
11 | 11 | |
12 | 12 | #include "tests/unity_headers.h" |
13 | 13 | |
14 | +#include <ctools/unused.h> | |
14 | 15 | #include <ctools/version_info.h> |
15 | 16 | |
16 | -#include <ctools/unused.h> | |
17 | - | |
18 | 17 | |
19 | 18 | void setUp(void) |
20 | 19 | { |
@@ -26,19 +25,19 @@ | ||
26 | 25 | |
27 | 26 | void testCompile(void) |
28 | 27 | { |
29 | - const char* const kLibraryName = CT_LIBRARY_NAME; | |
30 | - | |
31 | 28 | const int kMajorVersion = CT_MAJOR_VERSION; |
32 | 29 | const int kMinorVersion = CT_MINOR_VERSION; |
33 | 30 | const int kBuildRevision = CT_BUILD_REVISION; |
34 | 31 | |
35 | 32 | const bool kInternalBuild = CT_INTERNAL_BUILD; |
36 | 33 | |
37 | - CT_UNUSED(kLibraryName); | |
34 | + const char* const kVersion = CT_K_VERSION; | |
38 | 35 | |
39 | 36 | CT_UNUSED(kMajorVersion); |
40 | 37 | CT_UNUSED(kMinorVersion); |
41 | 38 | CT_UNUSED(kBuildRevision); |
42 | 39 | |
43 | 40 | CT_UNUSED(kInternalBuild); |
41 | + | |
42 | + CT_UNUSED(kVersion); | |
44 | 43 | } |