szaszm commented on code in PR #1987:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1987#discussion_r2534365093
##########
minifi-api/include/minifi-cpp/core/ProcessorDescriptor.h:
##########
@@ -28,6 +28,7 @@ class ProcessorDescriptor {
virtual void setSupportedRelationships(std::span<const
RelationshipDefinition> relationships) = 0;
virtual void setSupportedProperties(std::span<const PropertyReference>
properties) = 0;
+ virtual void setSupportedProperties(std::span<const Property> properties) =
0;
Review Comment:
why is this necessary?
##########
cmake/Extensions.cmake:
##########
@@ -100,6 +100,64 @@ macro(register_extension extension-name
extension-display-name extension-guard d
endif()
endmacro()
+macro(register_c_api_extension extension-name extension-display-name
extension-guard description)
+ set(${extension-guard} ${extension-name} PARENT_SCOPE)
+ get_property(extensions GLOBAL PROPERTY EXTENSION-OPTIONS)
+ set_property(GLOBAL APPEND PROPERTY EXTENSION-OPTIONS ${extension-name})
+ target_compile_definitions(${extension-name}
+ PRIVATE "EXTENSION_NAME=${extension-name}"
"EXTENSION_VERSION=${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
+ set_target_properties(${extension-name} PROPERTIES
+ ENABLE_EXPORTS True
+ POSITION_INDEPENDENT_CODE ON)
+ if(WIN32)
+ set_target_properties(${extension-name} PROPERTIES
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
+ ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
+ WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
Review Comment:
I would add the export macros in the C API extensions and not export all
symbols. CMake's GenerateExportHeader can make it simpler.
##########
extension-framework/cpp-extension-lib/include/api/core/logging/Logger.h:
##########
Review Comment:
do we no longer log IDs? because I don't see them on the interface
##########
cmake/Extensions.cmake:
##########
@@ -100,6 +100,64 @@ macro(register_extension extension-name
extension-display-name extension-guard d
endif()
endmacro()
+macro(register_c_api_extension extension-name extension-display-name
extension-guard description)
+ set(${extension-guard} ${extension-name} PARENT_SCOPE)
+ get_property(extensions GLOBAL PROPERTY EXTENSION-OPTIONS)
+ set_property(GLOBAL APPEND PROPERTY EXTENSION-OPTIONS ${extension-name})
+ target_compile_definitions(${extension-name}
+ PRIVATE "EXTENSION_NAME=${extension-name}"
"EXTENSION_VERSION=${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
+ set_target_properties(${extension-name} PROPERTIES
+ ENABLE_EXPORTS True
+ POSITION_INDEPENDENT_CODE ON)
+ if(WIN32)
+ set_target_properties(${extension-name} PROPERTIES
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
+ ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
+ WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
Review Comment:
I would add the export macros in the C API extensions and not export all
symbols. CMake's GenerateExportHeader can make it simpler. At least that's the
vision, but maybe there are blockers preventing this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]