3 Commits (386e464e1f70cc51ca947d34874f38c55bed603f)

Author SHA1 Message Date
Robin Mills d632988bbd Massive code prolog cleanup. 4 years ago
Luis Diaz Mas 4713336c93 Add more unit tests for TiffHeader 7 years ago
Luis Díaz Más cc7ff4122d Export all symbols when running unit tests. Add dummy test for private code.
I tried to use directly the private OBJECT library (exiv2lib_int) in the unit_tests targets, but the private objects have dependencies on the public symbols (circular dependency)
and therefore it is impossible to test the private code with that approach with the current design of the library.

Starting from CMake 3.3 we can use the variable CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS to export all the symbols of a shared library:
https://blog.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/

Even having the opportunity to use this variable (that will be only used when EXIV2_BUILD_UNIT_TESTS is enabled) the previous commits are still valid.
It is interesting to clearly differentiate between the public and private code of the library. Enforcing this, make us think twice before putting code in the public
part of the library.
8 years ago