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)
183183# This check requires _GNU_SOURCE on linux
184184check_include_file(dlfcn.h CLANG_HAVE_DLFCN_H)
185185if ( CLANG_HAVE_DLFCN_H )
186+ include (CMakePushCheckState)
186187 include (CheckLibraryExists)
187188 include (CheckSymbolExists)
188189 check_library_exists(dl dlopen "" HAVE_LIBDL)
190+ cmake_push_check_state()
189191 if ( HAVE_LIBDL )
190192 list (APPEND CMAKE_REQUIRED_LIBRARIES dl)
191193 endif ()
192194 list (APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
193195 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()
198197endif ()
199198
200199set (CLANG_RESOURCE_DIR "" CACHE STRING
You can’t perform that action at this time.
0 commit comments