-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add plugin support #378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Daan Timmer (daantimmer)
wants to merge
29
commits into
main
Choose a base branch
from
feature/add-plugin-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
206f412
feat: add plugin support
daantimmer 2e16fea
Rework compatibility tests in to plugins
daantimmer 9a88e4c
some cleanup
daantimmer 47f8e64
fix include guards
daantimmer 2e05c2e
use libraries.clear()
daantimmer 14beb62
Add flow and object diagramas
daantimmer 67d9469
Implement dynamic plugin support with snapshot management in Definiti…
daantimmer 50e9bdd
Suppress character conversion warnings for Clang in GoogleTest targets
daantimmer 6ecc6d7
Fix gtest discovery condition to exclude cross-compiling
daantimmer 3540749
Change execution behavior to continue on failure in CMake presets
daantimmer 5c3cb0a
Update include directories in ccr_plugin_register and ccr_add_plugin …
daantimmer 4a4e2e2
solve loading plugins on windows
daantimmer a4d5c7f
resolve parameter registration for plugins for windows
daantimmer 7391e56
chain plugin registration for windows instead
daantimmer 4d43d69
fix macos build?
daantimmer 6aab179
Add missing link for fmt::fmt in ccr_plugin_register
daantimmer 857f3e5
Set .dylib suffix for Apple plugin targets
daantimmer 527ca60
Clear converter type map and unregister plugins before unloading libr…
daantimmer bbb06e8
also test for timestamps and durations
daantimmer 60ab2b1
move ccache detection to root CMakeLists
daantimmer 308bdbd
Add PluginHostContext and update registration mechanism for plugins
daantimmer 281ceb2
working on getting error reporting to be shared between
daantimmer 971e3af
execute the CucumberResultReporter in the body of a step/hook
daantimmer 9c46922
delete actual_run from examples-tables
daantimmer 43c02eb
Refactor converter map handling in PluginRegister to avoid unnecessar…
daantimmer fe4a0d8
Add plugin support with ABI versioning and snapshot management
daantimmer 0a1992e
Enhance readability settings in .clang-tidy for identifier naming con…
daantimmer a466374
Implement PluginSession management for dynamic library loading and un…
daantimmer dd77a97
Refactor method names in ConverterTypeMap for consistency and clarity
daantimmer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # Helper function for creating cucumber-cpp-runner plugin targets | ||
| # | ||
| # Usage: | ||
| # ccr_add_plugin(my_plugin) | ||
| # ccr_add_plugin(my_plugin step1.cpp step2.cpp hooks.cpp) | ||
| # | ||
| # Creates a MODULE library target suitable for dynamic loading via --load. | ||
| # Plugins use the same STEP/HOOK/PARAMETER macros as statically-linked code. | ||
| # All symbols resolve from the host executable at runtime (ENABLE_EXPORTS). | ||
| # On macOS, -undefined dynamic_lookup suppresses linker errors for host symbols. | ||
| # On Windows, the plugin links against the host executable's import library. | ||
| # | ||
| # The default ccr_register entry point is provided automatically via | ||
| # ccr_plugin_register. Plugins do not need to define it themselves. | ||
| # | ||
| # Sources can be passed directly (like add_library) or added later via | ||
| # target_sources. | ||
|
|
||
| # Object library providing the default ccr_register entry point. | ||
| # Built once and linked into every plugin created by ccr_add_plugin. | ||
| if (NOT TARGET ccr_plugin_register) | ||
| add_library(ccr_plugin_register OBJECT | ||
| ${CMAKE_CURRENT_LIST_DIR}/../cucumber_cpp/library/plugin/PluginRegister.cpp | ||
| ) | ||
| target_include_directories(ccr_plugin_register SYSTEM PRIVATE | ||
| $<TARGET_PROPERTY:cucumber_cpp,INTERFACE_INCLUDE_DIRECTORIES> | ||
| $<TARGET_PROPERTY:cucumber_cpp.library,INCLUDE_DIRECTORIES> | ||
| ) | ||
| target_link_libraries(ccr_plugin_register PRIVATE fmt::fmt) | ||
| set_target_properties(ccr_plugin_register PROPERTIES | ||
| CXX_VISIBILITY_PRESET default | ||
| ) | ||
| endif() | ||
|
|
||
| function(ccr_add_plugin TARGET_NAME) | ||
| add_library(${TARGET_NAME} MODULE ${ARGN} $<TARGET_OBJECTS:ccr_plugin_register>) | ||
|
|
||
| # Plugins need the header include paths from cucumber_cpp and its | ||
| # transitive dependencies (fmt, gtest, gherkin, etc.) but must NOT link | ||
| # the actual libraries — symbols resolve from the host at runtime. | ||
| target_include_directories(${TARGET_NAME} SYSTEM PRIVATE | ||
| $<TARGET_PROPERTY:cucumber_cpp,INTERFACE_INCLUDE_DIRECTORIES> | ||
| $<TARGET_PROPERTY:cucumber_cpp.library,INCLUDE_DIRECTORIES> | ||
| ) | ||
|
|
||
| target_compile_definitions(${TARGET_NAME} PRIVATE | ||
| $<TARGET_PROPERTY:cucumber_cpp.library,COMPILE_DEFINITIONS> | ||
| ) | ||
|
|
||
| if (WIN32) | ||
| target_link_libraries(${TARGET_NAME} PRIVATE cucumber_cpp) | ||
| elseif (APPLE) | ||
| target_link_options(${TARGET_NAME} PRIVATE -undefined dynamic_lookup) | ||
| endif() | ||
|
|
||
| set_target_properties(${TARGET_NAME} PROPERTIES | ||
| PREFIX "" | ||
| CXX_VISIBILITY_PRESET default | ||
| ) | ||
|
|
||
| if (APPLE) | ||
| set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".dylib") | ||
| endif() | ||
| endfunction() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.