comparison OrthancFramework/Resources/CMake/Compiler.cmake @ 5478:2948c694352e

LSB on Debian 12: removed "--lsb-besteffort" and "-Wl,--no-undefined"
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 20 Dec 2023 16:38:11 +0100
parents 035ebc5b227c
children dc8e5c65be99
comparison
equal deleted inserted replaced
5477:78f68ad10b69 5478:2948c694352e
122 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR 122 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
123 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR 123 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR
124 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR 124 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
125 ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") 125 ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
126 126
127 if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" AND 127 if (NOT ${CMAKE_SYSTEM_VERSION} STREQUAL "LinuxStandardBase" AND
128 NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" AND
128 NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") 129 NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
129 # The "--no-undefined" linker flag makes the shared libraries 130 # The "--no-undefined" linker flag makes the shared libraries
130 # (plugins ModalityWorklists and ServeFolders) fail to compile on 131 # (plugins ModalityWorklists and ServeFolders) fail to compile on
131 # OpenBSD, and make the PostgreSQL plugin complain about missing 132 # OpenBSD, and make the PostgreSQL plugin complain about missing
132 # "environ" global variable in FreeBSD 133 # "environ" global variable in FreeBSD. Furthermore, on Linux
134 # Standard Base running on Debian 12, the "-Wl,--no-undefined"
135 # breaks the compilation (added after Orthanc 1.12.2).
133 set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") 136 set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
134 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") 137 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
135 endif() 138 endif()
136 139
137 # Remove the "-rdynamic" option 140 # Remove the "-rdynamic" option