adamdebreceni commented on code in PR #1987:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1987#discussion_r2567665133
##########
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:
this only has utility in tests where we directly link the test to (in this
case) `libminifi-llamacpp.dll`, since we are directly driving the processor in
the test (not waiting for the extension to register the callbacks) we need
access to all member function symbols
--
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]