File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -183,18 +183,17 @@ check_include_file(sys/resource.h CLANG_HAVE_RLIMITS)
183
183
# This check requires _GNU_SOURCE on linux
184
184
check_include_file (dlfcn.h CLANG_HAVE_DLFCN_H )
185
185
if ( CLANG_HAVE_DLFCN_H )
186
+ include (CMakePushCheckState )
186
187
include (CheckLibraryExists )
187
188
include (CheckSymbolExists )
188
189
check_library_exists (dl dlopen "" HAVE_LIBDL )
190
+ cmake_push_check_state ()
189
191
if ( HAVE_LIBDL )
190
192
list (APPEND CMAKE_REQUIRED_LIBRARIES dl )
191
193
endif ()
192
194
list (APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE )
193
195
check_symbol_exists (dladdr dlfcn.h CLANG_HAVE_DLADDR )
194
- list (REMOVE_ITEM CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE )
195
- if ( HAVE_LIBDL )
196
- list (REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES dl )
197
- endif ()
196
+ cmake_pop_check_state ()
198
197
endif ()
199
198
200
199
set (CLANG_RESOURCE_DIR "" CACHE STRING
You can’t perform that action at this time.
0 commit comments