spl-core 7.3.0rc1__py3-none-any.whl → 7.3.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.
spl_core/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "7.3.0-rc.1"
1
+ __version__ = "7.3.1"
spl_core/common.cmake CHANGED
@@ -76,6 +76,16 @@ macro(spl_add_test_source fileName)
76
76
  list(APPEND TEST_SOURCES ${to_be_appended})
77
77
  endmacro()
78
78
 
79
+ macro(spl_add_provided_interface directory)
80
+ _spl_get_absolute_path(to_be_appended ${directory})
81
+ list(APPEND PROVIDED_INTERFACES ${to_be_appended})
82
+ endmacro()
83
+
84
+ macro(spl_add_required_interface component)
85
+ _spl_slash_to_underscore(component_name ${component})
86
+ list(APPEND REQUIRED_INTERFACES ${component_name})
87
+ endmacro()
88
+
79
89
  macro(_spl_get_google_test)
80
90
  # GoogleTest requires at least C++14
81
91
  set(CMAKE_CXX_STANDARD 14)
@@ -182,19 +192,12 @@ macro(spl_create_component)
182
192
  \"has_reports\": \"\",
183
193
  \"reports_output_dir\": \"\"
184
194
  }")
185
-
186
- # handle include directories with global variable
187
- #list(APPEND target_include_directories__INCLUDES ${CMAKE_CURRENT_LIST_DIR}/src)
188
- #list(APPEND target_include_directories__INCLUDES ${CMAKE_CURRENT_BINARY_DIR})
189
- list(APPEND target_include_directories__INCLUDES ${INCLUDES})
190
- list(REMOVE_DUPLICATES target_include_directories__INCLUDES)
191
- set(target_include_directories__INCLUDES ${target_include_directories__INCLUDES} PARENT_SCOPE)
192
-
195
+ if(SOURCES)
196
+ # Create the component library
197
+ add_library(${component_name} ${CREATE_COMPONENT_LIBRARY_TYPE} ${SOURCES})
198
+ endif()
193
199
  if(BUILD_KIT STREQUAL prod)
194
200
  if(SOURCES)
195
- # Create the component library
196
- add_library(${component_name} ${CREATE_COMPONENT_LIBRARY_TYPE} ${SOURCES})
197
-
198
201
  # Define list of productive specific compile options for component's sources
199
202
  target_compile_definitions(${component_name} PRIVATE
200
203
  SPLE_TESTABLE_STATIC=static
@@ -355,9 +358,30 @@ Code Coverage
355
358
  endif(EXISTS ${_component_doc_file})
356
359
  endif(BUILD_KIT STREQUAL prod)
357
360
 
358
- # handle include directories with spl_macros
359
- spl_add_provided_interfaces("${CMAKE_CURRENT_LIST_DIR}/src")
360
- spl_add_provided_interfaces("${CMAKE_CURRENT_BINARY_DIR}")
361
+ # Implicitly add default include directories to provided interfaces
362
+ list(APPEND PROVIDED_INTERFACES ${CMAKE_CURRENT_LIST_DIR}/src)
363
+ list(APPEND PROVIDED_INTERFACES ${CMAKE_CURRENT_BINARY_DIR})
364
+ # Get rid of duplicates, in case the default directories where explicitly defined
365
+ list(REMOVE_DUPLICATES PROVIDED_INTERFACES)
366
+
367
+ # Make sure the component provided interfaces are added to the global include directories. Required for backward compatibility.
368
+ foreach(interfaceDir IN LISTS PROVIDED_INTERFACES)
369
+ spl_add_include(${interfaceDir})
370
+ endforeach()
371
+
372
+ list(APPEND target_include_directories__INCLUDES ${INCLUDES})
373
+ list(REMOVE_DUPLICATES target_include_directories__INCLUDES)
374
+ set(target_include_directories__INCLUDES ${target_include_directories__INCLUDES} PARENT_SCOPE)
375
+
376
+ # Define the target public interfaces to be used instead of the global include directories.
377
+ if(TARGET ${component_name})
378
+ foreach(interfaceDir IN LISTS PROVIDED_INTERFACES)
379
+ target_include_directories(${component_name} PUBLIC ${interfaceDir})
380
+ endforeach()
381
+ foreach(component IN LISTS REQUIRED_INTERFACES)
382
+ target_link_libraries(${component_name} PUBLIC ${component})
383
+ endforeach()
384
+ endif()
361
385
 
362
386
  # Collect all component info for later usage (e.g., in an extension)
363
387
  list(APPEND COMPONENTS_INFO ${_component_info})
@@ -564,9 +588,6 @@ macro(_spl_add_test_suite COMPONENT_NAME PROD_SRC TEST_SOURCES)
564
588
  target_compile_definitions(${exe_name} PRIVATE ${TEST_COMPILE_DEFINITIONS})
565
589
  target_link_options(${exe_name} PRIVATE ${TEST_LINK_OPTIONS})
566
590
 
567
- # Create the component library for its productive sources
568
- add_library(${COMPONENT_NAME} OBJECT ${SOURCES})
569
-
570
591
  target_compile_options(${COMPONENT_NAME} PRIVATE ${COMPONENT_TEST_COMPILE_OPTIONS})
571
592
 
572
593
  target_compile_definitions(${COMPONENT_NAME} PRIVATE ${TEST_COMPILE_DEFINITIONS})
@@ -744,71 +765,3 @@ macro(_spl_create_build_info_file)
744
765
  ]
745
766
  }")
746
767
  endmacro()
747
-
748
- macro(spl_add_provided_interfaces list_of_directories)
749
- # Collect all provided interfaces for later usage (e.g., in an extension)
750
- if(TARGET ${component_name})
751
- get_target_property(provided_interfaces ${component_name} PROVIDED_INTERFACES)
752
- if(provided_interfaces STREQUAL "provided_interfaces-NOTFOUND")
753
- set_target_properties(${component_name} PROPERTIES PROVIDED_INTERFACES "${list_of_directories}")
754
- else()
755
- list(APPEND provided_interfaces ${list_of_directories})
756
- set_target_properties(${component_name} PROPERTIES PROVIDED_INTERFACES "${provided_interfaces}")
757
- endif()
758
- endif()
759
- list(APPEND target_include_directories__INCLUDES ${list_of_directories})
760
- list(REMOVE_DUPLICATES target_include_directories__INCLUDES)
761
- set(target_include_directories__INCLUDES ${target_include_directories__INCLUDES} PARENT_SCOPE)
762
- endmacro()
763
-
764
- macro(spl_add_required_interfaces list_of_interfaces)
765
- if(TARGET ${component_name})
766
- get_target_property(required_interfaces ${component_name} REQUIRED_INTERFACES)
767
- if(required_interfaces STREQUAL "required_interfaces-NOTFOUND")
768
- set_target_properties(${component_name} PROPERTIES REQUIRED_INTERFACES "${list_of_interfaces}")
769
- else()
770
- list(APPEND required_interfaces ${list_of_interfaces})
771
- set_target_properties(${component_name} PROPERTIES REQUIRED_INTERFACES "${required_interfaces}")
772
- endif()
773
- endif()
774
- endmacro()
775
-
776
- macro(spl_resolve_interfaces)
777
- foreach(component_name ${COMPONENT_NAMES})
778
- if(TARGET ${component_name})
779
- # get provided interfaces
780
- get_target_property(COMP_PROVIDED_INTERFACES ${component_name} PROVIDED_INTERFACES)
781
- if(NOT COMP_PROVIDED_INTERFACES STREQUAL "COMP_PROVIDED_INTERFACES-NOTFOUND")
782
- target_include_directories(${component_name} PUBLIC ${COMP_PROVIDED_INTERFACES})
783
- endif()
784
-
785
- # get required interfaces
786
- set(COMP_REQUIRED_INTERFACES "")
787
- get_target_property(REQUIRED_INTERFACES ${component_name} REQUIRED_INTERFACES)
788
- if(NOT REQUIRED_INTERFACES STREQUAL "REQUIRED_INTERFACES-NOTFOUND")
789
- foreach(interface ${REQUIRED_INTERFACES})
790
- if (TARGET ${interface})
791
- # if the interface is a target, we can get the provided interfaces
792
- get_target_property(IF_PROVIDED_INTERFACES ${interface} PROVIDED_INTERFACES)
793
- list(APPEND COMP_REQUIRED_INTERFACES ${IF_PROVIDED_INTERFACES})
794
- else()
795
- # if the interface is not a target, we assume it is a path to an include directory
796
- _spl_get_absolute_path(absolute_interface ${interface})
797
- if(EXISTS "${absolute_interface}" AND IS_DIRECTORY "${absolute_interface}")
798
- list(APPEND COMP_REQUIRED_INTERFACES ${absolute_interface})
799
- # support the old way of handling includes
800
- list(APPEND target_include_directories__INCLUDES ${absolute_interface})
801
- else()
802
- message(WARNING "Required interface ${interface} not found for component ${component_name}.")
803
- endif()
804
- endif()
805
- endforeach()
806
- list(REMOVE_DUPLICATES target_include_directories__INCLUDES)
807
- else()
808
- set(COMP_REQUIRED_INTERFACES ${target_include_directories__INCLUDES})
809
- endif()
810
- # add the include directories to the component
811
- target_include_directories(${component_name} PUBLIC ${COMP_REQUIRED_INTERFACES})
812
- endif()
813
- endforeach()
814
- endmacro()
@@ -1,2 +1,3 @@
1
1
  spl_add_source(src/main.c)
2
+ spl_add_required_interface(src/greeter)
2
3
  spl_create_component(LONG_NAME "Main")
@@ -1,11 +1,11 @@
1
1
  [
2
2
  {
3
3
  "name": "prod",
4
- "environmentSetupScript": "${workspaceFolder}/.venv/Scripts/activate"
4
+ "environmentSetupScript": "${workspaceFolder}/build/env_setup.bat"
5
5
  },
6
6
  {
7
7
  "name": "test",
8
8
  "toolchainFile": "tools/toolchains/gcc/toolchain.cmake",
9
- "environmentSetupScript": "${workspaceFolder}/.venv/Scripts/activate"
9
+ "environmentSetupScript": "${workspaceFolder}/build/env_setup.bat"
10
10
  }
11
11
  ]
@@ -2,7 +2,6 @@
2
2
  "recommendations": [
3
3
  "mhutchie.git-graph",
4
4
  "ms-vscode.cmake-tools",
5
- "twxs.cmake",
6
5
  "ms-vscode.cpptools",
7
6
  "ms-vscode.cpptools-themes",
8
7
  "visualstudioexptteam.intellicode-api-usage-examples",
@@ -15,6 +14,8 @@
15
14
  "felipecaputo.git-project-manager",
16
15
  "ms-vscode.powershell",
17
16
  "waderyan.gitblame",
18
- "sandcastle.vscode-open"
17
+ "sandcastle.vscode-open",
18
+ "josetr.cmake-language-support-vscode",
19
+ "ibm.output-colorizer"
19
20
  ]
20
21
  }
@@ -1,17 +1,22 @@
1
1
  {
2
2
  "python.testing.pytestEnabled": true,
3
- "python.testing.pytestArgs": [
4
- "test"
5
- ],
6
3
  "python.testing.unittestEnabled": false,
7
- "python.analysis.extraPaths": [
8
- "test"
4
+ "python.analysis.include": [
5
+ "test",
6
+ "build/modules/spl-core-src"
9
7
  ],
8
+ "[python]": {
9
+ "editor.defaultFormatter": "charliermarsh.ruff"
10
+ },
11
+ "[cmake]": {
12
+ "editor.defaultFormatter": "josetr.cmake-language-support-vscode"
13
+ },
10
14
  "cmake.configureOnOpen": false,
11
- "cmake.buildDirectory": "${workspaceFolder}/build/${variant:variant}/${buildKit}",
15
+ "cmake.buildDirectory": "${workspaceFolder}/build/${variant:variant}/${buildKit}/${buildType}",
12
16
  "cmake.configureSettings": {
13
17
  "BUILD_KIT": "${buildKit}",
14
- "CMAKE_MESSAGE_LOG_LEVEL": "STATUS"
18
+ "CMAKE_MESSAGE_LOG_LEVEL": "STATUS",
19
+ "BUILD_TYPE": "${buildType}",
15
20
  },
16
21
  "cmake.generator": "Ninja",
17
22
  "cmake.debugConfig": {
@@ -21,25 +26,90 @@
21
26
  },
22
27
  "cmake.configureOnEdit": false,
23
28
  "cmake.buildBeforeRun": false,
24
- "cmake.environment": {
25
- "PIPENV_VERBOSITY": "-1",
26
- "PIPENV_VENV_IN_PROJECT": "1"
27
- },
29
+ "cmake.options.statusBarVisibility": "compact",
28
30
  "cmake.buildToolArgs": [],
29
31
  "git.ignoreLimitWarning": true,
30
32
  "C_Cpp.errorSquiggles": "enabled",
31
33
  "C_Cpp.default.cStandard": "gnu17",
32
34
  "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
33
- "C_Cpp.formatting": "vcFormat",
35
+ "C_Cpp.formatting": "clangFormat",
36
+ "editor.formatOnSave": true,
37
+ "files.insertFinalNewline": true,
38
+ "files.trimTrailingWhitespace": true,
34
39
  "files.associations": {
35
40
  "*.h": "c",
36
41
  "*.c": "c",
37
42
  "Jenkinsfile": "groovy",
38
- "*.py": "python"
43
+ "*.py": "python",
44
+ "array": "cpp",
45
+ "string_view": "cpp",
46
+ "initializer_list": "cpp",
47
+ "span": "cpp",
48
+ "any": "cpp",
49
+ "atomic": "cpp",
50
+ "bit": "cpp",
51
+ "*.tcc": "cpp",
52
+ "cctype": "cpp",
53
+ "charconv": "cpp",
54
+ "chrono": "cpp",
55
+ "clocale": "cpp",
56
+ "cmath": "cpp",
57
+ "compare": "cpp",
58
+ "concepts": "cpp",
59
+ "condition_variable": "cpp",
60
+ "cstdarg": "cpp",
61
+ "cstddef": "cpp",
62
+ "cstdint": "cpp",
63
+ "cstdio": "cpp",
64
+ "cstdlib": "cpp",
65
+ "cstring": "cpp",
66
+ "ctime": "cpp",
67
+ "cwchar": "cpp",
68
+ "cwctype": "cpp",
69
+ "deque": "cpp",
70
+ "forward_list": "cpp",
71
+ "list": "cpp",
72
+ "map": "cpp",
73
+ "set": "cpp",
74
+ "string": "cpp",
75
+ "unordered_map": "cpp",
76
+ "unordered_set": "cpp",
77
+ "vector": "cpp",
78
+ "exception": "cpp",
79
+ "algorithm": "cpp",
80
+ "functional": "cpp",
81
+ "iterator": "cpp",
82
+ "memory": "cpp",
83
+ "memory_resource": "cpp",
84
+ "numeric": "cpp",
85
+ "optional": "cpp",
86
+ "random": "cpp",
87
+ "ratio": "cpp",
88
+ "system_error": "cpp",
89
+ "tuple": "cpp",
90
+ "type_traits": "cpp",
91
+ "utility": "cpp",
92
+ "format": "cpp",
93
+ "fstream": "cpp",
94
+ "iomanip": "cpp",
95
+ "iosfwd": "cpp",
96
+ "iostream": "cpp",
97
+ "istream": "cpp",
98
+ "limits": "cpp",
99
+ "mutex": "cpp",
100
+ "new": "cpp",
101
+ "numbers": "cpp",
102
+ "ostream": "cpp",
103
+ "semaphore": "cpp",
104
+ "sstream": "cpp",
105
+ "stdexcept": "cpp",
106
+ "stop_token": "cpp",
107
+ "streambuf": "cpp",
108
+ "thread": "cpp",
109
+ "typeinfo": "cpp",
110
+ "variant": "cpp"
39
111
  },
40
112
  "git.repositoryScanMaxDepth": 3,
41
113
  "git-graph.maxDepthOfRepoSearch": 3,
42
- "[python]": {
43
- "editor.defaultFormatter": "charliermarsh.ruff"
44
- }
114
+ "editor.tabSize": 4,
45
115
  }
@@ -9,77 +9,101 @@
9
9
  "problemMatcher": []
10
10
  },
11
11
  {
12
- "label": "Update all tools",
13
- "detail": "Update of all installed scoop packages",
12
+ "label": "Environment",
13
+ "detail": "Print all environment variables for debugging purposes",
14
14
  "type": "shell",
15
- "command": ".\\build.ps1 -command 'scoop update --all'",
15
+ "command": "dir env:",
16
16
  "problemMatcher": []
17
17
  },
18
18
  {
19
- "label": "Environment",
20
- "detail": "Print all environment variables for debugging purposes",
19
+ "label": "Configure variant",
20
+ "detail": "Feature configuration using KConfig",
21
21
  "type": "shell",
22
- "command": "dir env:",
22
+ "command": ".venv/Scripts/poetry run guiconfig",
23
+ "options": {
24
+ "env": {
25
+ "KCONFIG_CONFIG": "variants/${input:variant}/config.txt"
26
+ }
27
+ },
23
28
  "problemMatcher": []
24
29
  },
25
30
  {
26
- "type": "cmake",
27
- "label": "Build with CMake",
28
- "detail": "Build target 'all' of selected variant",
29
- "command": "build",
30
- "targets": [
31
- "all"
32
- ],
31
+ "label": "Open variant test report",
32
+ "detail": "Open the variant's overall test report in your web browser",
33
+ "command": "${workspaceFolder}/build/${input:variant}/test/Debug/reports/html/index.html",
34
+ "type": "shell",
35
+ "presentation": {
36
+ "reveal": "always"
37
+ },
33
38
  "group": {
34
39
  "kind": "build",
35
- "isDefault": true
40
+ "isDefault": false
41
+ }
42
+ },
43
+ {
44
+ "label": "Open variant coverage report",
45
+ "detail": "Open the variant's overall coverage report in your web browser",
46
+ "command": "${workspaceFolder}/build/${input:variant}/test/Debug/reports/coverage/index.html",
47
+ "type": "shell",
48
+ "presentation": {
49
+ "reveal": "always"
36
50
  },
37
- "problemMatcher": [
38
- {
39
- "owner": "c/cpp",
40
- "fileLocation": [
41
- "absolute"
42
- ],
43
- "pattern": {
44
- "regexp": "^ctc (I|W|E)(\\d+): \\[\"(.*)\" (\\d+)/(\\d+)\\] (.*)",
45
- "file": 3,
46
- "line": 4,
47
- "column": 5,
48
- "severity": 1,
49
- "message": 6
50
- }
51
- }
52
- ]
51
+ "group": {
52
+ "kind": "build",
53
+ "isDefault": false
54
+ }
53
55
  },
54
56
  {
55
- "type": "cmake",
56
- "label": "Clean with CMake",
57
- "command": "clean",
58
- "problemMatcher": [],
59
- "detail": "Clean build artifacts of selected variant"
57
+ "label": "Open component test report",
58
+ "detail": "Open the component's test report in your web browser",
59
+ "command": "${workspaceFolder}/build/${input:variant}/test/Debug/${input:component}/reports/html/index.html",
60
+ "type": "shell",
61
+ "presentation": {
62
+ "reveal": "always"
63
+ },
64
+ "group": {
65
+ "kind": "build",
66
+ "isDefault": false
67
+ }
60
68
  },
61
69
  {
62
- "type": "cmake",
63
- "label": "Configure with CMake",
64
- "command": "configure",
65
- "problemMatcher": [],
66
- "detail": "Configure selected variant"
70
+ "label": "Open component coverage report",
71
+ "detail": "Open the component's coverage report in your web browser",
72
+ "command": "${workspaceFolder}/build/${input:variant}/test/Debug/${input:component}/reports/coverage/index.html",
73
+ "type": "shell",
74
+ "presentation": {
75
+ "reveal": "always"
76
+ },
77
+ "group": {
78
+ "kind": "build",
79
+ "isDefault": false
80
+ }
67
81
  },
68
82
  {
69
- "label": "Configure variant",
70
- "detail": "Feature configuration using KConfig",
83
+ "label": "Generate PAYC options file",
84
+ "detail": "Generate Polyspace-As-You-Code options file for the selected variant",
85
+ "command": "./build.ps1",
86
+ "args": [
87
+ "-command",
88
+ "sple_static_analysis.exe generate-ps-options-file --project-root-dir ${workspaceFolder} --variant ${input:variant} --build-kit prod --build-type ${input:buildType} --payc --output-folder ./build"
89
+ ],
71
90
  "type": "shell",
72
- "command": ".venv/Scripts/poetry run guiconfig",
73
- "options": {
74
- "env": {
75
- "KCONFIG_CONFIG": "variants/${input:variant}/config.txt"
76
- }
91
+ "presentation": {
92
+ "reveal": "always"
77
93
  },
78
- "problemMatcher": []
94
+ "group": {
95
+ "kind": "build",
96
+ "isDefault": false
97
+ }
79
98
  },
80
99
  {
81
- "label": "open report html",
82
- "command": "${workspaceFolder}/build/${input:variant}/test/src/${input:component}/reports/html/index.html",
100
+ "label": "Generate Polyspace BF options file",
101
+ "detail": "Generate Polyspace Bug Finder options file for the selected variant",
102
+ "command": "./build.ps1",
103
+ "args": [
104
+ "-command",
105
+ "sple_static_analysis.exe generate-ps-options-file --project-root-dir ${workspaceFolder} --variant ${input:variant} --build-kit prod --build-type Debug --output-folder ./variants/${input:variant}"
106
+ ],
83
107
  "type": "shell",
84
108
  "presentation": {
85
109
  "reveal": "always"
@@ -105,8 +129,17 @@
105
129
  "id": "component",
106
130
  "description": "Which component do you want to select?",
107
131
  "options": [
108
- "greeter",
109
- "main"
132
+ "src/greeter",
133
+ "src/main"
134
+ ]
135
+ },
136
+ {
137
+ "type": "pickString",
138
+ "id": "buildType",
139
+ "description": "Which build type do you want to use?",
140
+ "options": [
141
+ "Debug",
142
+ "Release"
110
143
  ]
111
144
  }
112
145
  ]
@@ -10,7 +10,7 @@ include(${CMAKE_SOURCE_DIR}/variants/${VARIANT}/config.cmake)
10
10
  if(BUILD_KIT STREQUAL prod)
11
11
  project(${VARIANT} C ASM)
12
12
  else()
13
- # In case of test the project is a C++ project due to GTest usage
13
+ # C++ project due to GTest usage
14
14
  project(${VARIANT} C ASM CXX)
15
15
  endif()
16
16
 
@@ -24,23 +24,7 @@ if(DEFINED ENV{SPLCORE_PATH})
24
24
  message(WARNING "SPLCORE_PATH defined! Use fixed SPL-CORE version from: $ENV{SPLCORE_PATH}")
25
25
  include($ENV{SPLCORE_PATH}/spl.cmake)
26
26
  else()
27
- # Fetch spl-core
28
- FetchContent_Declare(
29
- spl-core
30
- GIT_REPOSITORY https://github.com/avengineers/spl-core.git
31
- GIT_TAG develop
32
- )
33
- FetchContent_MakeAvailable(spl-core)
34
-
35
- # Include spl-core
36
- include(${spl-core_SOURCE_DIR}/src/spl_core/spl.cmake)
27
+ include(".venv/Lib/site-packages/spl_core/spl.cmake")
37
28
  endif()
38
29
 
39
30
  include(${CMAKE_SOURCE_DIR}/variants/${VARIANT}/parts.cmake)
40
-
41
- # add all components' include directories to the include paths of each component
42
- foreach(component_name ${COMPONENT_NAMES})
43
- if(TARGET ${component_name})
44
- target_include_directories(${component_name} PUBLIC ${target_include_directories__INCLUDES})
45
- endif()
46
- endforeach()
@@ -1,4 +1,5 @@
1
1
  {
2
2
  "python_version": "3.11",
3
- "python_package_manager": "pipenv>=2024.0.3"
3
+ "python_package_manager": "poetry>=2.0",
4
+ "scoop_ignore_scoopfile": true
4
5
  }
@@ -1 +1 @@
1
- powershell -ExecutionPolicy Bypass -File %~dp0build.ps1 %* || exit /b 1
1
+ powershell -ExecutionPolicy Bypass -File %~dp0build.ps1 -waitForKey %* || exit /b 1