adam-markovics commented on a change in pull request #1107:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1107#discussion_r676529139
##########
File path: cmake/BuildTests.cmake
##########
@@ -151,11 +151,13 @@ SET(INT_TEST_COUNT 0)
FOREACH(testfile ${INTEGRATION_TESTS})
get_filename_component(testfilename "${testfile}" NAME_WE)
add_executable("${testfilename}" "${TEST_DIR}/integration/${testfile}")
+ target_wholearchive_library("${testfilename}" minifi-standard-processors)
Review comment:
My experience is that it would be optimized out. Also seen this in
another project. Without this line the test would fail (it did until I came up
with this). Maybe it also depends on linkers and their settings.
https://stackoverflow.com/questions/7327741/initialisation-of-static-object-when-linking-against-a-static-library
--
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]