GEOS-DEV / thirdPartyLibs

Repository to build the GEOSX third party libraries
3 stars 12 forks source link

add `_d` suffix to `minizip` static library #219

Closed tbeltzun closed 1 year ago

tbeltzun commented 1 year ago

When building the thirdPartyLibs using the CMake Debug configuration, the minizip target has the DEBUG_POSTFIX property set to _d.

As a result, fesapi fails to find the correct library in https://github.com/GEOS-DEV/thirdPartyLibs/blob/92075d20def5608ae5777d8602b4555d2f384f63/CMakeLists.txt#L1248

This PR propagates theminizip postfix, allowing to build thirdPartyLibs in Debug configuration.

klevzoff commented 1 year ago

This is surprising, given that we don't explicitly propagate CMAKE_BUILD_TYPE to minizip sub-project, nor does ExternalProject_Add inherit it implicitly (I know this because I've had to manually add -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} to multiple TPLs to get debug builds for them). By any chance, have you been able to figure out why the minizip sub-project gets built in Debug in the first place?

tbeltzun commented 1 year ago

Hi,

The minizip CMakeLists.txt contains the following:

set_target_properties(${PROJECT_NAME} PROPERTIES DEBUG_POSTFIX "_d" EXPORT_NAME minizip)

Please note that CMAKE_BUILD_TYPE is documented to check if an environment variable with that name is set, explaining why I hit this build failure.

EDIT: closed this, as I went back to the classical -DCMAKE_BUILD_TYPE=... command line argument usage.

untereiner commented 1 year ago

The env variable check seems to be a recent behavior. I wasn’t aware of it. To me there should be a findMinizip that handles the path