Skip to content

Commit 4d2d5f3

Browse files
committed
fix compilation with newer CMake
It seems CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS on CMake 3.27 breaks compilation on Windows. The reason for it here is wrong: unit tests do not need non exported symbols.
1 parent 4dfb781 commit 4d2d5f3

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ if ( EXIV2_ENABLE_EXTERNAL_XMP )
7979
set(EXIV2_ENABLE_XMP OFF)
8080
endif()
8181

82-
if(BUILD_TESTING AND EXIV2_BUILD_UNIT_TESTS)
83-
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) # Requires CMake 3.3.3
84-
endif()
85-
8682
include(cmake/findDependencies.cmake REQUIRED)
8783
include(cmake/compilerFlags.cmake REQUIRED)
8884
include(cmake/generateConfigFile.cmake REQUIRED)

src/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# Note that this is a hack for testing the internals of the library. If EXIV2_BUILD_UNIT_TESTS==OFF
2-
# Then we only export the symbols that are explicitly exported
3-
if(BUILD_TESTING AND EXIV2_BUILD_UNIT_TESTS)
4-
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) # Requires CMake 3.3.3
5-
endif()
6-
71
include(CMakePackageConfigHelpers)
82

93
include_directories(${CMAKE_CURRENT_BINARY_DIR})

0 commit comments

Comments
 (0)