-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
Missing symbols when building tests on Windows #1374
Comments
That is because of the switch to the new catch2 testing framework.
|
Works indeed (haven't checked if they actually run though), but perhaps you really want more formally: --- a/tests/CMakeLists.txt 2024-11-08 14:45:29.053186000 +0100
+++ b/tests/CMakeLists.txt 2024-11-08 15:07:37.327068900 +0100
@@ -12,11 +12,12 @@
endif()
add_library(testframework STATIC ${CMAKE_BINARY_DIR}/generated/test-config.cc test_utils.cc catch_amalgamated.cpp)
+target_link_libraries(testframework PUBLIC heif)
macro(add_libheif_test TEST_FILE)
set(TEST_NAME ${TEST_FILE})
add_executable(${TEST_NAME} ${TEST_FILE}.cc)
- target_link_libraries(${TEST_NAME} PRIVATE heif testframework)
+ target_link_libraries(${TEST_NAME} PRIVATE testframework)
add_test(NAME ${TEST_NAME} COMMAND ./${TEST_NAME})
set_tests_properties(${TEST_NAME} PROPERTIES SKIP_REGULAR_EXPRESSION "[1-9][0-9]* skipped")
endmacro()
@@ -24,7 +25,7 @@
macro(add_heifio_test TEST_FILE)
set(TEST_NAME ${TEST_FILE})
add_executable(${TEST_NAME} main.cc ${TEST_FILE}.cc)
- target_link_libraries(${TEST_NAME} PRIVATE heif heifio testframework)
+ target_link_libraries(${TEST_NAME} PRIVATE heifio testframework)
target_include_directories(${TEST_NAME} PRIVATE ${libheif_SOURCE_DIR})
add_test(NAME ${TEST_NAME} COMMAND ./${TEST_NAME})
set_tests_properties(${TEST_NAME} PROPERTIES SKIP_REGULAR_EXPRESSION "[1-9][0-9]* skipped") Also, maybe have |
I have the feeling that we have to link
That is what the cmake presets are for. When building for a release package, use the |
Ok, thanks. |
Thanks for the report. |
Building 1.19.2 now gives:
1.19.1 patched for symbol export was building ok.
I guess one could just turn off building the tests, but looks like Windows CI should be generally improved...
The text was updated successfully, but these errors were encountered: