diff options
| author | Hauke Mehrtens | 2023-11-11 21:18:18 +0000 |
|---|---|---|
| committer | Hauke Mehrtens | 2023-11-11 21:22:59 +0000 |
| commit | 263b9a97cf7e1e2467319c23832b705fc01190b5 (patch) | |
| tree | 2cf5f41d982deaedf77d3cef603c49713409116c | |
| parent | 91666a38b7bd4bd353394986d8343a33ba61d8e2 (diff) | |
| download | ustream-ssl-263b9a97cf7e1e2467319c23832b705fc01190b5.tar.gz | |
cmake: Fail if undefined symbols are used
Make the linking of the shared library fail when undefined symbols are
used. Linking undefined symbols in a shared library normally works and
the linking of the binary using the shared library fails. We also
compile some example applications and they failed already.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
| -rw-r--r-- | CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2de6590..f4dca0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ ENDIF() ADD_DEFINITIONS(-Wno-unused-parameter -Wmissing-declarations) SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") +SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined") IF(MBEDTLS) ADD_DEFINITIONS(-DHAVE_MBEDTLS) |