summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2023-04-17 20:16:23 +0300
committerIvan Maidanski <ivmai@mail.ru>2023-04-17 20:16:23 +0300
commitba363361b19192213b612d21010d6da087d21a05 (patch)
tree221cae2efada890e3954466db27558b770d5c3f9 /CMakeLists.txt
parent2c21a656d8fb05c3fc2becc5608313f9176cae1e (diff)
downloadbdwgc-ba363361b19192213b612d21010d6da087d21a05.tar.gz
Do not check presence of getcontext and dl_iterate_phdr by cmake on Win32
(refactoring) * CMakeLists.txt (getcontext): Do not check_function_exists if BORLAND or MSVC. * CMakeLists.txt (dl_iterate_phdr): Do not check_function_exists if WIN32.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 10 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26ef527d..a9e11847 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -484,15 +484,19 @@ if (NOT HAVE_EXECINFO_H)
endif()
# Check for getcontext (uClibc can be configured without it, for example).
-check_function_exists(getcontext HAVE_GETCONTEXT)
-if (NOT HAVE_GETCONTEXT)
- add_definitions("-DNO_GETCONTEXT")
+if (NOT (BORLAND OR MSVC))
+ check_function_exists(getcontext HAVE_GETCONTEXT)
+ if (NOT HAVE_GETCONTEXT)
+ add_definitions("-DNO_GETCONTEXT")
+ endif()
endif()
# Check whether dl_iterate_phdr exists (as a strong symbol).
-check_function_exists(dl_iterate_phdr HAVE_DL_ITERATE_PHDR)
-if (HAVE_DL_ITERATE_PHDR)
- add_definitions("-DHAVE_DL_ITERATE_PHDR")
+if (NOT WIN32)
+ check_function_exists(dl_iterate_phdr HAVE_DL_ITERATE_PHDR)
+ if (HAVE_DL_ITERATE_PHDR)
+ add_definitions("-DHAVE_DL_ITERATE_PHDR")
+ endif(HAVE_DL_ITERATE_PHDR)
endif()
check_symbol_exists(sigsetjmp setjmp.h HAVE_SIGSETJMP)