summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 15 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 56773dbb..bd22e8d9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,6 +62,18 @@ if(APPLE)
62 include(MacRpath) 62 include(MacRpath)
63endif() 63endif()
64 64
65if(UNIX)
66 if(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
67 set(LINUX TRUE)
68 elseif(CMAKE_SYSTEM_NAME MATCHES "kOpenBSD.*|OpenBSD.*")
69 set(OPENBSD TRUE)
70 elseif(CMAKE_SYSTEM_NAME MATCHES "kNetBSD.*|NetBSD.*")
71 set(NETBSD TRUE)
72 elseif(CMAKE_SYSTEM_NAME MATCHES "kFreeBSD.*|FreeBSD")
73 set(FREEBSD TRUE)
74 endif()
75endif()
76
65enable_testing() 77enable_testing()
66 78
67set(CMAKE_MACOSX_RPATH ON) 79set(CMAKE_MACOSX_RPATH ON)
@@ -184,10 +196,10 @@ if(ASAN)
184else() 196else()
185 # Forbid undefined symbols in shared libraries. This is incompatible with 197 # Forbid undefined symbols in shared libraries. This is incompatible with
186 # asan, so it's in the else branch here. 198 # asan, so it's in the else branch here.
187 if(APPLE) 199 if(LINUX)
188 add_dllflag("-undefined error")
189 else()
190 add_dllflag("-Wl,-z,defs") 200 add_dllflag("-Wl,-z,defs")
201 else()
202 add_dllflag("-undefined error")
191 endif() 203 endif()
192endif() 204endif()
193 205