# HG changeset patch # User Sebastien Jodogne # Date 1548082659 -3600 # Node ID 077e1101d9084cc5ed7319efe94a79d9a6f62e93 # Parent 6e8822be2f08c2bacf26304ca1a31911eeadc285 fix to compile postgresql plugin in FreeBSD diff -r 6e8822be2f08 -r 077e1101d908 Resources/CMake/Compiler.cmake --- a/Resources/CMake/Compiler.cmake Mon Jan 21 12:09:04 2019 +0100 +++ b/Resources/CMake/Compiler.cmake Mon Jan 21 15:57:39 2019 +0100 @@ -73,9 +73,12 @@ ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") - if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") + if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" AND + NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") # The "--no-undefined" linker flag makes the shared libraries - # (plugins ModalityWorklists and ServeFolders) fail to compile on OpenBSD + # (plugins ModalityWorklists and ServeFolders) fail to compile on + # OpenBSD, and make the PostgreSQL plugin complain about missing + # "environ" global variable in FreeBSD set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") endif()