diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 18 |
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) |
63 | endif() | 63 | endif() |
64 | 64 | ||
65 | if(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() | ||
75 | endif() | ||
76 | |||
65 | enable_testing() | 77 | enable_testing() |
66 | 78 | ||
67 | set(CMAKE_MACOSX_RPATH ON) | 79 | set(CMAKE_MACOSX_RPATH ON) |
@@ -184,10 +196,10 @@ if(ASAN) | |||
184 | else() | 196 | else() |
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() |
192 | endif() | 204 | endif() |
193 | 205 | ||