proj-flow 0.8.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. proj_flow/__init__.py +4 -0
  2. proj_flow/__main__.py +10 -0
  3. proj_flow/api/__init__.py +10 -0
  4. proj_flow/api/arg.py +134 -0
  5. proj_flow/api/completers.py +93 -0
  6. proj_flow/api/ctx.py +238 -0
  7. proj_flow/api/env.py +416 -0
  8. proj_flow/api/init.py +26 -0
  9. proj_flow/api/makefile.py +140 -0
  10. proj_flow/api/step.py +173 -0
  11. proj_flow/base/__init__.py +11 -0
  12. proj_flow/base/cmd.py +50 -0
  13. proj_flow/base/inspect.py +133 -0
  14. proj_flow/base/matrix.py +240 -0
  15. proj_flow/base/plugins.py +44 -0
  16. proj_flow/base/uname.py +71 -0
  17. proj_flow/flow/__init__.py +11 -0
  18. proj_flow/flow/cli/__init__.py +66 -0
  19. proj_flow/flow/cli/cmds.py +385 -0
  20. proj_flow/flow/cli/finder.py +59 -0
  21. proj_flow/flow/configs.py +162 -0
  22. proj_flow/flow/dependency.py +153 -0
  23. proj_flow/flow/init.py +65 -0
  24. proj_flow/flow/interact.py +134 -0
  25. proj_flow/flow/layer.py +176 -0
  26. proj_flow/flow/steps.py +104 -0
  27. proj_flow/log/__init__.py +10 -0
  28. proj_flow/log/commit.py +463 -0
  29. proj_flow/log/fmt.py +12 -0
  30. proj_flow/log/format.py +13 -0
  31. proj_flow/log/hosting/__init__.py +11 -0
  32. proj_flow/log/hosting/github.py +248 -0
  33. proj_flow/log/msg.py +201 -0
  34. proj_flow/log/release.py +34 -0
  35. proj_flow/log/rich_text/__init__.py +22 -0
  36. proj_flow/log/rich_text/api.py +126 -0
  37. proj_flow/log/rich_text/markdown.py +61 -0
  38. proj_flow/log/rich_text/re_structured_text.py +68 -0
  39. proj_flow/plugins/__init__.py +8 -0
  40. proj_flow/plugins/base.py +30 -0
  41. proj_flow/plugins/cmake/__init__.py +11 -0
  42. proj_flow/plugins/cmake/__version__.py +5 -0
  43. proj_flow/plugins/cmake/build.py +29 -0
  44. proj_flow/plugins/cmake/config.py +59 -0
  45. proj_flow/plugins/cmake/context.py +112 -0
  46. proj_flow/plugins/cmake/pack.py +37 -0
  47. proj_flow/plugins/cmake/parser.py +166 -0
  48. proj_flow/plugins/cmake/test.py +29 -0
  49. proj_flow/plugins/commands/__init__.py +12 -0
  50. proj_flow/plugins/commands/bootstrap.py +21 -0
  51. proj_flow/plugins/commands/ci/__init__.py +17 -0
  52. proj_flow/plugins/commands/ci/changelog.py +47 -0
  53. proj_flow/plugins/commands/ci/matrix.py +46 -0
  54. proj_flow/plugins/commands/ci/release.py +116 -0
  55. proj_flow/plugins/commands/init.py +75 -0
  56. proj_flow/plugins/commands/list.py +167 -0
  57. proj_flow/plugins/commands/run.py +147 -0
  58. proj_flow/plugins/commands/system.py +60 -0
  59. proj_flow/plugins/conan/__init__.py +66 -0
  60. proj_flow/plugins/conan/_conan.py +146 -0
  61. proj_flow/plugins/github.py +13 -0
  62. proj_flow/plugins/sign/__init__.py +130 -0
  63. proj_flow/plugins/sign/win32.py +191 -0
  64. proj_flow/plugins/store/__init__.py +11 -0
  65. proj_flow/plugins/store/store_both.py +22 -0
  66. proj_flow/plugins/store/store_packages.py +79 -0
  67. proj_flow/plugins/store/store_tests.py +21 -0
  68. proj_flow/template/layers/base/.clang-format +27 -0
  69. proj_flow/template/layers/base/.flow/config.yml +38 -0
  70. proj_flow/template/layers/base/.flow/flow.py.mustache +172 -0
  71. proj_flow/template/layers/base/.flow/matrix.yml +63 -0
  72. proj_flow/template/layers/base/.flow/official.yml +4 -0
  73. proj_flow/template/layers/base/.gitignore +39 -0
  74. proj_flow/template/layers/base/README.md.mustache +2 -0
  75. proj_flow/template/layers/base/flow +7 -0
  76. proj_flow/template/layers/base/flow.cmd +9 -0
  77. proj_flow/template/layers/base.json +2 -0
  78. proj_flow/template/layers/cmake/.flow/cmake/common.cmake.mustache +27 -0
  79. proj_flow/template/layers/cmake/.flow/extensions/wall/__init__.py.mustache +2 -0
  80. proj_flow/template/layers/cmake/.flow/extensions/wall/icons/__init__.py.mustache +54 -0
  81. proj_flow/template/layers/cmake/.flow/extensions/wall/icons/magick.py.mustache +97 -0
  82. proj_flow/template/layers/cmake/.flow/packages/base.cmake.mustache +33 -0
  83. proj_flow/template/layers/cmake/.flow/packages/config.cmake +12 -0
  84. proj_flow/template/layers/cmake/.flow/packages/cpack.cmake +3 -0
  85. proj_flow/template/layers/cmake/.flow/packages/wix/cpack.cmake.mustache +1 -0
  86. proj_flow/template/layers/cmake/.flow/packages/wix/patches.in.wix +10 -0
  87. proj_flow/template/layers/cmake/.flow/packages/wix.cmake.mustache +13 -0
  88. proj_flow/template/layers/cmake/CMakeGraphVizOptions.cmake +8 -0
  89. proj_flow/template/layers/cmake/CMakeLists.txt.mustache +213 -0
  90. proj_flow/template/layers/cmake/CMakePresets.json +196 -0
  91. proj_flow/template/layers/cmake/data/assets/appicon.ico +0 -0
  92. proj_flow/template/layers/cmake/data/assets/appicon.png +0 -0
  93. proj_flow/template/layers/cmake/data/assets/wix_banner.bmp +0 -0
  94. proj_flow/template/layers/cmake/data/assets/wix_dialog.bmp +0 -0
  95. proj_flow/template/layers/cmake/data/icons/.gitignore +3 -0
  96. proj_flow/template/layers/cmake/data/icons/appicon-mask.svg +6 -0
  97. proj_flow/template/layers/cmake/data/icons/appicon.svg +27 -0
  98. proj_flow/template/layers/cmake/src/main.cc.mustache +38 -0
  99. proj_flow/template/layers/cmake/src/version.hpp.in.mustache +36 -0
  100. proj_flow/template/layers/cmake/tests/test.cc.mustache +17 -0
  101. proj_flow/template/layers/cmake.json +15 -0
  102. proj_flow/template/layers/conan/.flow/cmake/libcxx_toolchain.cmake +4 -0
  103. proj_flow/template/layers/conan/.flow/cmake/output_dirs_setup.cmake +19 -0
  104. proj_flow/template/layers/conan/conanfile.txt +9 -0
  105. proj_flow/template/layers/conan.json +3 -0
  106. proj_flow/template/layers/github_actions/.github/linters/.isort.cfg +4 -0
  107. proj_flow/template/layers/github_actions/.github/linters/.mypy.ini +2 -0
  108. proj_flow/template/layers/github_actions/.github/workflows/build.yml +241 -0
  109. proj_flow/template/layers/github_actions/.github/workflows/linter.yml +59 -0
  110. proj_flow/template/layers/github_actions/CPPLINT.cfg +16 -0
  111. proj_flow/template/layers/github_actions.json +3 -0
  112. proj_flow/template/layers/github_social/.github/ISSUE_TEMPLATE/bug_report.md.mustache +42 -0
  113. proj_flow/template/layers/github_social/.github/ISSUE_TEMPLATE/feature_request.md.mustache +28 -0
  114. proj_flow/template/layers/github_social/CODE_OF_CONDUCT.md.mustache +76 -0
  115. proj_flow/template/layers/github_social/CONTRIBUTING.md +10 -0
  116. proj_flow/template/layers/github_social.json +3 -0
  117. proj_flow/template/licenses/0BSD.mustache +12 -0
  118. proj_flow/template/licenses/MIT.mustache +21 -0
  119. proj_flow/template/licenses/Unlicense.mustache +24 -0
  120. proj_flow/template/licenses/WTFPL.mustache +13 -0
  121. proj_flow/template/licenses/Zlib.mustache +19 -0
  122. proj_flow-0.8.1.dist-info/METADATA +81 -0
  123. proj_flow-0.8.1.dist-info/RECORD +126 -0
  124. proj_flow-0.8.1.dist-info/WHEEL +4 -0
  125. proj_flow-0.8.1.dist-info/entry_points.txt +2 -0
  126. proj_flow-0.8.1.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,213 @@
1
+ # Copyright (c) {{COPY.YEAR}} {{COPY.HOLDER}}
2
+ # This file is licensed under {{COPY.LICENSE}} license (see LICENSE for details)
3
+
4
+ cmake_minimum_required (VERSION {{CMAKE_VERSION}})
5
+ project ({{PROJECT.NAME}}
6
+ VERSION 0.1.0
7
+ DESCRIPTION "{{PROJECT.DESCRIPTION}}"
8
+ LANGUAGES CXX)
9
+
10
+ set(PROJECT_VERSION_SHORT "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
11
+ set(PROJECT_VERSION_STABILITY "" # or "-alpha", or "-beta", or "-rc.1", or "-rc.2"
12
+ CACHE STRING "" FORCE)
13
+
14
+ if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
15
+ message(FATAL_ERROR "Building in source firectory is not supported")
16
+ endif()
17
+
18
+ set({{NAME_PREFIX}}_TESTING ON CACHE BOOL "Compile and/or run self-tests")
19
+ set({{NAME_PREFIX}}_INSTALL ON CACHE BOOL "Install the {{#cmake.application}}application{{/cmake.application}}{{#cmake.library}}library{{/cmake.library}}")
20
+ set({{NAME_PREFIX}}_SANITIZE OFF CACHE BOOL "Compile with sanitizers enabled")
21
+
22
+ set(CMAKE_CXX_STANDARD 23)
23
+ set(CMAKE_CXX_EXTENSIONS OFF)
24
+
25
+ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
26
+
27
+ {{#with_conan}}
28
+ list(APPEND CMAKE_MODULE_PATH "${PROJECT_BINARY_DIR}/conan" "${PROJECT_SOURCE_DIR}/.flow/cmake")
29
+ list(APPEND CMAKE_PREFIX_PATH "${PROJECT_BINARY_DIR}/conan")
30
+ {{/with_conan}}
31
+ {{^with_conan}}
32
+ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/.flow/cmake")
33
+ {{/with_conan}}
34
+
35
+ include(common)
36
+ {{#with_conan}}
37
+ include(output_dirs_setup)
38
+
39
+ set(CONAN_CMAKE_SILENT_OUTPUT ON)
40
+ find_package(Python3 COMPONENTS Interpreter REQUIRED)
41
+ find_package(fmt REQUIRED)
42
+ find_package(GTest REQUIRED)
43
+ find_package(mbits-args REQUIRED)
44
+ {{/with_conan}}
45
+
46
+ if ({{NAME_PREFIX}}_TESTING)
47
+ enable_testing()
48
+
49
+ {{#with_conan}}
50
+ find_package(GTest REQUIRED)
51
+ {{/with_conan}}
52
+
53
+ set(TEST_REPORT_DIR "${PROJECT_BINARY_DIR}/test-results")
54
+ set(TEST_SANITIZER_TAG "")
55
+ if ({{NAME_PREFIX}}_SANITIZE)
56
+ set(TEST_SANITIZER_TAG "-sanitizer")
57
+ endif()
58
+ set(TEST_REPORT_FILE "${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-${CMAKE_BUILD_TYPE}${TEST_SANITIZER_TAG}.xml")
59
+ endif()
60
+
61
+ {{#with_conan}}
62
+ include(output_dirs_setup)
63
+ old_conan_output_dirs_setup()
64
+ {{/with_conan}}
65
+
66
+ # See <https://github.com/lefticus/cppbestpractices/blob/v1.0.0/02-Use_the_Tools_Available.md#compilers>
67
+
68
+ if (MSVC)
69
+ set({{NAME_PREFIX}}_ADDITIONAL_COMPILE_FLAGS
70
+ /D_CRT_SECURE_NO_WARNINGS
71
+ /D_CRT_NONSTDC_NO_WARNINGS
72
+ /utf-8
73
+ /permissive-
74
+ /Zc:__cplusplus
75
+ /W4
76
+ /w14242
77
+ /w14254
78
+ /w14263
79
+ /w14265
80
+ /w14287
81
+ /we4289
82
+ /w14296
83
+ /w14311
84
+ /w14545
85
+ /w14546
86
+ /w14547
87
+ /w14549
88
+ /w14555
89
+ /w14619
90
+ /w14640
91
+ /w14826
92
+ /w14905
93
+ /w14906
94
+ /w14928
95
+ /w14946)
96
+ if (COV_SANITIZE)
97
+ list(APPEND {{NAME_PREFIX}}_ADDITIONAL_COMPILE_FLAGS
98
+ /fsanitize=address
99
+ /D_DISABLE_VECTOR_ANNOTATION
100
+ /D_DISABLE_STRING_ANNOTATION
101
+ )
102
+ endif()
103
+ else()
104
+ set({{NAME_PREFIX}}_ADDITIONAL_COMPILE_FLAGS
105
+ -Wall -Wextra
106
+ -Wnon-virtual-dtor
107
+ -Wold-style-cast
108
+ -Wcast-align
109
+ -Wunused
110
+ -Woverloaded-virtual
111
+ -Wpedantic
112
+ -Wconversion
113
+ -Wsign-conversion
114
+ -Wnull-dereference
115
+ -Wdouble-promotion
116
+ -Wformat=2
117
+ )
118
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
119
+ list(APPEND {{NAME_PREFIX}}_ADDITIONAL_COMPILE_FLAGS
120
+ -fcolor-diagnostics
121
+ -Wno-braced-scalar-init
122
+ # -Wlifetime
123
+ )
124
+ else()
125
+ list(APPEND {{NAME_PREFIX}}_ADDITIONAL_COMPILE_FLAGS
126
+ -fdiagnostics-color
127
+ -Wmisleading-indentation
128
+ -Wduplicated-cond
129
+ -Wduplicated-branches
130
+ -Wlogical-op
131
+ -Wuseless-cast
132
+ )
133
+ endif()
134
+ if (COV_SANITIZE)
135
+ list(APPEND {{NAME_PREFIX}}_ADDITIONAL_COMPILE_FLAGS
136
+ -fsanitize=address
137
+ -fsanitize=undefined
138
+
139
+ )
140
+ list(APPEND {{NAME_PREFIX}}_ADDITIONAL_LINK_FLAGS
141
+ -fsanitize=address
142
+ -fsanitize=undefined
143
+ )
144
+ endif()
145
+ endif()
146
+
147
+ include(${PROJECT_SOURCE_DIR}/.flow/packages/config.cmake)
148
+ include(CPack)
149
+
150
+ configure_file({{SRCDIR}}/version{{EXT.hxx}}.in {{INCLUDEDIR}}/version{{EXT.hxx}} @ONLY)
151
+
152
+ set(SRCS
153
+ {{!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
154
+ !!
155
+ !! main.cc
156
+ !! cmake.application
157
+ !!
158
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}}
159
+ {{#cmake.application}}
160
+ {{SRCDIR}}/main{{EXT.cxx}}
161
+ {{/cmake.application}}
162
+ "${CMAKE_CURRENT_BINARY_DIR}/{{INCLUDEDIR}}/version{{EXT.hxx}}"
163
+ )
164
+
165
+ {{cmake.cmd}}(${PROJECT_NAME}{{cmake.type}} ${SRCS})
166
+
167
+ {{#cmake.application}}
168
+ add_win32_icon(${PROJECT_NAME} "appicon.ico")
169
+ {{/cmake.application}}
170
+ target_compile_options(${PROJECT_NAME} PRIVATE {{${}}{{NAME_PREFIX}}_ADDITIONAL_COMPILE_FLAGS})
171
+ target_link_options(${PROJECT_NAME} PUBLIC {{${}}{{NAME_PREFIX}}_ADDITIONAL_LINK_FLAGS})
172
+ target_include_directories(${PROJECT_NAME}
173
+ PUBLIC
174
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
175
+ ${CMAKE_CURRENT_BINARY_DIR}/include
176
+ PRIVATE
177
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
178
+ ${CMAKE_CURRENT_BINARY_DIR}/src
179
+ )
180
+ target_link_libraries(${PROJECT_NAME}{{#with_conan}} fmt::fmt mbits::args{{/with_conan}})
181
+ set_target_properties(${PROJECT_NAME} PROPERTIES
182
+ VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
183
+ {{#cmake.dynamic-library}}
184
+ SOVERSION ${PROJECT_VERSION_MAJOR}
185
+ {{/cmake.dynamic-library}}
186
+ )
187
+
188
+ ##################################################################
189
+ ## INSTALL
190
+ ##################################################################
191
+
192
+ if ({{NAME_PREFIX}}_INSTALL)
193
+ install(TARGETS ${PROJECT_NAME})
194
+ endif()
195
+
196
+ ##################################################################
197
+ ## TESTING
198
+ ##################################################################
199
+
200
+ if ({{NAME_PREFIX}}_TESTING)
201
+ file(GLOB EXCLUDES_TEST_SRCS_CC tests/*.cc)
202
+ file(GLOB EXCLUDES_TEST_SRCS_CPP tests/*.cpp)
203
+ file(GLOB EXCLUDES_TEST_SRCS_CXX tests/*.cxx)
204
+ source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/tests FILES
205
+ ${EXCLUDES_TEST_SRCS_CC}
206
+ ${EXCLUDES_TEST_SRCS_CPP}
207
+ ${EXCLUDES_TEST_SRCS_CXX})
208
+
209
+ add_project_test(${PROJECT_NAME} ${EXCLUDES_TEST_SRCS_CC} ${EXCLUDES_TEST_SRCS_CPP} ${EXCLUDES_TEST_SRCS_CXX})
210
+ target_link_libraries(${PROJECT_NAME}-test PUBLIC GTest::gmock_main fmt::fmt)
211
+
212
+ add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME}-test "--gtest_output=xml:${TEST_REPORT_DIR}/${PROJECT_NAME}/${TEST_REPORT_FILE}")
213
+ endif()
@@ -0,0 +1,196 @@
1
+ {
2
+ "version": 6,
3
+ "cmakeMinimumRequired": {
4
+ "major": 3,
5
+ "minor": 23,
6
+ "patch": 0
7
+ },
8
+ "configurePresets": [
9
+ {
10
+ "name": "base",
11
+ "hidden": true,
12
+ "cacheVariables": {
13
+ "CMAKE_POLICY_DEFAULT_CMP0091": "NEW"
14
+ },
15
+ "toolchainFile": "${sourceDir}/build/conan/conan_toolchain.cmake"
16
+ },
17
+ {
18
+ "name": "libcxx",
19
+ "hidden": true,
20
+ "cacheVariables": {
21
+ "CMAKE_POLICY_DEFAULT_CMP0091": "NEW"
22
+ },
23
+ "toolchainFile": "${sourceDir}/cmake/libcxx_toolchain.cmake"
24
+ },
25
+ {
26
+ "name": "release-base",
27
+ "hidden": true,
28
+ "cacheVariables": {
29
+ "CMAKE_BUILD_TYPE": "Release"
30
+ },
31
+ "binaryDir": "${sourceDir}/build/release"
32
+ },
33
+ {
34
+ "name": "release",
35
+ "displayName": "Release",
36
+ "description": "Release build",
37
+ "inherits": [
38
+ "base",
39
+ "release-base"
40
+ ]
41
+ },
42
+ {
43
+ "name": "debug-base",
44
+ "hidden": true,
45
+ "cacheVariables": {
46
+ "CMAKE_BUILD_TYPE": "Debug"
47
+ },
48
+ "binaryDir": "${sourceDir}/build/debug"
49
+ },
50
+ {
51
+ "name": "debug",
52
+ "displayName": "Debug",
53
+ "description": "Debug build",
54
+ "inherits": [
55
+ "base",
56
+ "debug-base"
57
+ ]
58
+ },
59
+ {
60
+ "name": "ninja-base",
61
+ "hidden": true,
62
+ "generator": "Ninja"
63
+ },
64
+ {
65
+ "name": "make-base",
66
+ "hidden": true,
67
+ "generator": "Unix Makefiles"
68
+ },
69
+ {
70
+ "name": "msbuild-base",
71
+ "hidden": true,
72
+ "generator": "Visual Studio 17 2022",
73
+ "architecture": "x64"
74
+ },
75
+ {
76
+ "name": "release-ninja",
77
+ "displayName": "Ninja (Release)",
78
+ "description": "Release build using Ninja generator",
79
+ "inherits": [
80
+ "release",
81
+ "ninja-base"
82
+ ]
83
+ },
84
+ {
85
+ "name": "release-libcxx-ninja",
86
+ "displayName": "Ninja (Release) & libc++",
87
+ "description": "Release build using Ninja generator and libc++",
88
+ "inherits": [
89
+ "libcxx",
90
+ "release-base",
91
+ "ninja-base"
92
+ ]
93
+ },
94
+ {
95
+ "name": "release-make",
96
+ "displayName": "Makefile (Release)",
97
+ "description": "Release build using Unix Makefiles generator",
98
+ "inherits": [
99
+ "release",
100
+ "make-base"
101
+ ]
102
+ },
103
+ {
104
+ "name": "release-msbuild",
105
+ "displayName": "Visual Studio (Release)",
106
+ "description": "Release build using Visual Studio generator",
107
+ "inherits": [
108
+ "release",
109
+ "msbuild-base"
110
+ ]
111
+ },
112
+ {
113
+ "name": "debug-ninja",
114
+ "displayName": "Ninja (Debug)",
115
+ "description": "Debug build using Ninja generator",
116
+ "inherits": [
117
+ "debug",
118
+ "ninja-base"
119
+ ]
120
+ },
121
+ {
122
+ "name": "debug-libcxx-ninja",
123
+ "displayName": "Ninja (Debug) & libc++",
124
+ "description": "Debug build using Ninja generator and libc++",
125
+ "inherits": [
126
+ "libcxx",
127
+ "debug-base",
128
+ "ninja-base"
129
+ ]
130
+ },
131
+ {
132
+ "name": "debug-make",
133
+ "displayName": "Makefile (Debug)",
134
+ "description": "Debug build using Unix Makefiles generator",
135
+ "inherits": [
136
+ "debug",
137
+ "make-base"
138
+ ]
139
+ },
140
+ {
141
+ "name": "debug-msbuild",
142
+ "displayName": "Visual Studio (Debug)",
143
+ "description": "Debug build using Visual Studio generator",
144
+ "inherits": [
145
+ "debug",
146
+ "msbuild-base"
147
+ ]
148
+ }
149
+ ],
150
+ "buildPresets": [
151
+ {
152
+ "name": "release",
153
+ "displayName": "Build for Release",
154
+ "configurePreset": "release",
155
+ "configuration": "Release"
156
+ },
157
+ {
158
+ "name": "debug",
159
+ "displayName": "Build for Debug",
160
+ "configurePreset": "debug",
161
+ "configuration": "Debug"
162
+ }
163
+ ],
164
+ "testPresets": [
165
+ {
166
+ "name": "debug",
167
+ "displayName": "Test a Debug build",
168
+ "configurePreset": "debug",
169
+ "configuration": "Debug",
170
+ "output": {
171
+ "outputOnFailure": true
172
+ }
173
+ },
174
+ {
175
+ "name": "release",
176
+ "displayName": "Test a Release build",
177
+ "configurePreset": "release",
178
+ "configuration": "Release",
179
+ "output": {
180
+ "outputOnFailure": true
181
+ }
182
+ }
183
+ ],
184
+ "packagePresets": [
185
+ {
186
+ "name": "debug",
187
+ "displayName": "Pack a Debug build",
188
+ "configurePreset": "debug"
189
+ },
190
+ {
191
+ "name": "release",
192
+ "displayName": "Pack a Release build",
193
+ "configurePreset": "release"
194
+ }
195
+ ]
196
+ }
@@ -0,0 +1,3 @@
1
+ *.png
2
+ appicon-win32*
3
+ plugin-win32*
@@ -0,0 +1,6 @@
1
+ <svg xmlns='http://www.w3.org/2000/svg' width='256px' height='256px' viewBox='0 0 48 48' version='1.1' fill="none">
2
+ <rect fill="#000" width="48" height="48" />
3
+ <g>
4
+ <rect fill="#eed" width="44" height="42" x="2" y="3" rx="3" />
5
+ </g>
6
+ </svg>
@@ -0,0 +1,27 @@
1
+ <svg xmlns='http://www.w3.org/2000/svg' width='256px' height='256px' viewBox='0 0 48 48' version='1.1' fill="none">
2
+ <defs>
3
+ <radialGradient id="gradient-fill" cx="12" cy="15" r="48" gradientUnits="userSpaceOnUse">
4
+ <stop offset="0" stop-color="#fff" />
5
+ <stop offset="1" stop-color="#777" />
6
+ </radialGradient>
7
+ </defs>
8
+ <g>
9
+ <rect fill="url(#gradient-fill)" width="42" height="40" x="3" y="4" rx="2" />
10
+ <rect fill="#030d17" width="42" height="6" x="3" y="4" />
11
+ <rect fill="#eed" width="3" height="3" x="4.5" y="5" rx="1" />
12
+ <rect fill="#eed" width="3" height="3" x="10" y="5" rx="1" />
13
+ <rect fill="#eed" width="3" height="3" x="40" y="5" rx="1" />
14
+ <g stroke="#030d17" stroke-width="2">
15
+ <rect width="42" height="40" x="3" y="4" rx="2" />
16
+ <rect width="42" height="35" x="3" y="9" rx="2" />
17
+ </g>
18
+ <g stroke="#030d17" stroke-width="1" transform="translate(24,26.5)">
19
+ <rect x="-11" y="-11" width="10" height="10" rx="1" />
20
+ <rect x="-11" y="1" width="10" height="10" rx="1" />
21
+ <rect x="1" y="1" width="10" height="10" rx="1" />
22
+ <g transform="translate(7,-13)">
23
+ <rect width="9" height="9" rx="1" transform="rotate(45)" />
24
+ </g>
25
+ </g>
26
+ </g>
27
+ </svg>
@@ -0,0 +1,38 @@
1
+ // Copyright (c) {{COPY.YEAR}} {{COPY.HOLDER}}
2
+ // This code is licensed under {{COPY.LICENSE}} license (see LICENSE for details)
3
+
4
+ {{#with_conan}}
5
+ #include <fmt/format.h>
6
+ #include <args/parser.hpp>
7
+ {{/with_conan}}
8
+ #include <{{INCLUDE_PREFIX}}/version{{EXT.hxx}}>
9
+
10
+ int main(int argc, char* argv[]) {
11
+ std::string path;
12
+ bool verbose{false};
13
+ long counter{};
14
+
15
+ args::null_translator tr{};
16
+ args::parser parser{"{{PROJECT.DESCRIPTION}}",
17
+ args::from_main(argc, argv), &tr};
18
+
19
+ parser.arg(path, "path").meta("<file>").help("sets the path of foobar");
20
+ parser.set<std::true_type>(verbose, "v")
21
+ .help("sets the output to be more verbose")
22
+ .opt();
23
+ parser.arg(counter).meta("N").help(
24
+ "sets the argument for the plural string");
25
+ parser.parse();
26
+
27
+ {{#with_conan}}
28
+ auto msg = std::string_view{counter == 1 ? "you have one foobar"
29
+ : "you have {0} foobars"};
30
+ fmt::print(fmt::runtime(msg), counter);
31
+ {{/with_conan}}
32
+ {{^with_conan}}
33
+ auto msg = std::string_view{counter == 1 ? "you have one foobar"
34
+ : "you have %ld foobars"};
35
+ printf(msg.data(), counter);
36
+ {{/with_conan}}
37
+ fputc('\n', stdout);
38
+ }
@@ -0,0 +1,36 @@
1
+ // DO NOT MODIFY, THIS FILE IS GENERATED FROM version{{EXT.hxx}}.in
2
+ //
3
+ // @PROJECT_NAME@/@PROJECT_VERSION@@PROJECT_VERSION_STABILITY@
4
+ //
5
+ // Copyright (c) {{COPY.YEAR}} {{COPY.HOLDER}}
6
+ // This code is licensed under {{COPY.LICENSE}} license (see LICENSE for details)
7
+ // clang-format off
8
+
9
+ #pragma once
10
+
11
+ #define {{NAME_PREFIX}}_VERSION_STR "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@"
12
+ #define {{NAME_PREFIX}}_VERSION_STR_SHORT "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@"
13
+ #define {{NAME_PREFIX}}_VERSION_STABILITY "@PROJECT_VERSION_STABILITY@"
14
+ #define {{NAME_PREFIX}}_VERSION_BUILD_META "@PROJECT_VERSION_BUILD_META@"
15
+ #define {{NAME_PREFIX}}_PROJECT_NAME "@PROJECT_NAME@"
16
+
17
+ #define {{NAME_PREFIX}}_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
18
+ #define {{NAME_PREFIX}}_VERSION_MINOR @PROJECT_VERSION_MINOR@
19
+ #define {{NAME_PREFIX}}_VERSION_PATCH @PROJECT_VERSION_PATCH@
20
+
21
+ #ifndef RC_INVOKED
22
+ namespace cov {
23
+ struct version {
24
+ static constexpr char string[] = "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@"; // NOLINT build/include_what_you_use and whitespace/line_length
25
+ static constexpr char string_short[] = "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@";
26
+ static constexpr char stability[] = "@PROJECT_VERSION_STABILITY@"; // or "-alpha.5", "-beta", "-rc.3", "", ...
27
+ static constexpr char build_meta[] = "@PROJECT_VERSION_BUILD_META@";
28
+ static constexpr char ui[] = "@PROJECT_VERSION@@PROJECT_VERSION_STABILITY@@PROJECT_VERSION_BUILD_META@";
29
+
30
+ static constexpr unsigned major = @PROJECT_VERSION_MAJOR@;
31
+ static constexpr unsigned minor = @PROJECT_VERSION_MINOR@;
32
+ static constexpr unsigned patch = @PROJECT_VERSION_PATCH@;
33
+ };
34
+ } // namespace cov
35
+ #endif
36
+ // clang-format on
@@ -0,0 +1,17 @@
1
+ // Copyright (c) {{COPY.YEAR}} {{COPY.HOLDER}}
2
+ // This code is licensed under {{COPY.LICENSE}} license (see LICENSE for details)
3
+
4
+ {{#with_conan}}
5
+ #include <fmt/format.h>
6
+ #include <gtest/gtest.h>
7
+ {{/with_conan}}
8
+
9
+ namespace {{NAMESPACE}}::testing {
10
+
11
+ {{#with_conan}}
12
+ TEST({{NAMESPACE}}, test) {
13
+ ASSERT_EQ(1, 1);
14
+ }
15
+ {{/with_conan}}
16
+
17
+ } // namespace {{NAMESPACE}}::testing
@@ -0,0 +1,15 @@
1
+ {
2
+ "when": "with_cmake",
3
+ "filelist": {
4
+ "src/main.cc.mustache": {
5
+ "path": "{{SRCDIR}}/main{{EXT.cxx}}",
6
+ "when": "cmake.application"
7
+ },
8
+ "tests/test.cc.mustache": {
9
+ "path": "tests/test{{EXT.cxx}}"
10
+ },
11
+ "src/version.hpp.in.mustache": {
12
+ "path": "{{SRCDIR}}/version{{EXT.hxx}}.in"
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,4 @@
1
+ include("${CMAKE_CURRENT_LIST_DIR}/../../build/conan/conan_toolchain.cmake")
2
+
3
+ string(REPLACE " -stdlib=libstdc++" " -stdlib=libc++" CMAKE_CXX_FLAGS_INIT_LOCAL "${CMAKE_CXX_FLAGS_INIT}")
4
+ set(CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT_LOCAL}")
@@ -0,0 +1,19 @@
1
+ macro(old_conan_output_dirs_setup)
2
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
3
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
4
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
5
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
6
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
7
+
8
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
9
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
10
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
11
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
12
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
13
+
14
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
15
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
16
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
17
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
18
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
19
+ endmacro()
@@ -0,0 +1,9 @@
1
+ [requires]
2
+ mbits-args/0.12.3
3
+ gtest/1.14.0
4
+ fmt/10.2.1
5
+
6
+ [generators]
7
+ CMakeDeps
8
+ CMakeToolchain
9
+ VirtualRunEnv
@@ -0,0 +1,3 @@
1
+ {
2
+ "when": "with_conan"
3
+ }
@@ -0,0 +1,4 @@
1
+ [settings]
2
+ profile = black
3
+ multi_line_output = 3
4
+ include_trailing_comma = true
@@ -0,0 +1,2 @@
1
+ [mypy]
2
+ ignore_missing_imports = True