Linux: Check for unresolved symbols at link time

develop
lethosor 2018-05-09 16:14:50 -04:00
parent cd717a4fe8
commit 5b2cc7dc6e
1 changed files with 2 additions and 0 deletions

@ -217,6 +217,8 @@ if(APPLE)
set(CMAKE_MACOSX_RPATH 1) set(CMAKE_MACOSX_RPATH 1)
elseif(UNIX) elseif(UNIX)
add_definitions(-D_LINUX) add_definitions(-D_LINUX)
# Check for unresolved symbols at link time
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-z,defs")
elseif(WIN32) elseif(WIN32)
add_definitions(-DWIN32) add_definitions(-DWIN32)
endif() endif()