aboutsummaryrefslogtreecommitdiffstats
path: root/build_settings.cmake
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@yahoo-inc.com>2016-09-16 15:34:25 +0200
committerArnstein Ressem <aressem@yahoo-inc.com>2016-09-16 15:34:25 +0200
commit9c0a59892a51687ff0cce84c9b3ac2d3bcbefbf1 (patch)
tree6a6f57ee60bbf413e3bba097e04b53a38939f1a0 /build_settings.cmake
parent714c2e3bfb06ff239515252db24560a15d905874 (diff)
Update build settings with --no-undefined.
Diffstat (limited to 'build_settings.cmake')
-rw-r--r--build_settings.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/build_settings.cmake b/build_settings.cmake
index 020056ce354..17ee05bff1b 100644
--- a/build_settings.cmake
+++ b/build_settings.cmake
@@ -77,3 +77,7 @@ if(EXTRA_LINK_DIRECTORY)
endif()
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath,${CMAKE_BUILD_RPATH}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,${CMAKE_BUILD_RPATH}")
+
+# Don't allow unresolved symbols in executables or shared libraries
+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")