From 5b2cc7dc6eaa1e9d82c9ea48a669e7f91d602fe0 Mon Sep 17 00:00:00 2001 From: lethosor Date: Wed, 9 May 2018 16:14:50 -0400 Subject: [PATCH] Linux: Check for unresolved symbols at link time --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3849ef462..c45f22f1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,6 +217,8 @@ if(APPLE) set(CMAKE_MACOSX_RPATH 1) elseif(UNIX) add_definitions(-D_LINUX) + # Check for unresolved symbols at link time + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-z,defs") elseif(WIN32) add_definitions(-DWIN32) endif()