Reduce number of checks in CMake and more cleanup (PR #26364)

19 views
Skip to first unread message

VZ

unread,
Apr 7, 2026, 6:35:50 PM (2 days ago) Apr 7
to wx-...@googlegroups.com, Subscribed

This started as an attempt to reduce the number of checks uselessly done in CMake but, as usual, transformed into something more with cleanup of some adjacent areas. Note that in addition to removing and skipping some checks, this PR also adds some checks that were (wrongly) not done by CMake before.

I'm not sure if my _if_not_linux hack is the best way to do what I want, but I'm pretty sure I want it, it's a bit ridiculous to check for the functions available since 20+ years on every run. Of course, this is the case for configure too but it makes a bit more sense to preserve support for legacy systems there.

@MaartenBent Please let me know if you have any objections/proposals for improvement, otherwise I'll merge this if/when the CI jobs pass.


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/26364

Commit Summary

  • 5f8e214 Remove check for standard C headers
  • 3b2c571 Don't bother checking for va_copy() availability
  • 4e828c5 Check for wcsrtombs() in CMake builds too
  • 0cb94f3 Correctly define wxHAS_LOG_CHAIN in CMake build
  • 5d9e599 Define HAVE_DL_ITERATE_PHDR in CMake builds
  • 86e4196 Remove unused HAVE___THREAD_KEYWORD
  • cfb3856 Re-enable wxUSE_DETECT_SM by default in CMake builds
  • 7999427 Make setup.h generated by CMake more consistent with configure
  • a93fa64 Remove unused HAVE_FCNTL_H and CMake check for it
  • 12a3a16 Prefer using "timezone" to "__timezone" on POSIX systems
  • 459b007 Don't check for fallback functions if we find the first one
  • 40a3229 Check for a bunch of thread-related functions in CMake too
  • 73d66e7 Check for _NL_TIME_FIRST_WEEKDAY in CMake build too
  • 7ed866c Remove tests for non-standard and never used in practice wcstr.h
  • b2342ec Stop checking if wchar_t is a distinct type, just assume it is
  • 0e1fc41 Remove inconsistent underscore from HAVE_PTHREAD_SET_CONCURRENCY
  • 96ae1fb Remove checks wchar.h existence
  • b5703d4 Remove check for <widec.h> from configure and HAVE_WIDEC_H
  • 6ad18e6 Only check for ftime() in CMake if gettimeofday() is not found
  • 771c730 Drop support for 3 argument gethostbyname_r()
  • 978599a Drop support for 4 argument getservbyname_r()
  • 4b93660 Don't check for gethostname() in CMake if uname() was found
  • 62ac675 Stop checking for get{host,serv}byname()
  • 5d13d7c Skip checks that always succeed under Linux in CMake
  • 73baab4 Stop checking for putws() in configure and CMake

File Changes

(21 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26364@github.com>

VZ

unread,
Apr 7, 2026, 7:04:36 PM (2 days ago) Apr 7
to wx-...@googlegroups.com, Push

@vadz pushed 2 commits.

  • 4b7600e Fix quoting in wx_check_c_source_compiles_if_not_linux()
  • f275d6f Add detection of SM library to CMake


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26364/before/73baab427be6cfad434264d8ef70d83f50cf2954/after/f275d6f43578772f6596cf3b41cf8a2a4df08aef@github.com>

VZ

unread,
Apr 7, 2026, 8:10:57 PM (2 days ago) Apr 7
to wx-...@googlegroups.com, Push

@vadz pushed 4 commits.

  • 476232c Take multiple symbols in wx_check_symbol_exists_if_not_linux()
  • 3b4536b Use check_symbol_exists() for pthread functions
  • 2d77a2f Check for _timezone first under Windows
  • 5b15fa2 Skip some CMake checks that always fail under Windows


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26364/before/f275d6f43578772f6596cf3b41cf8a2a4df08aef/after/5b15fa245044c054c926bc9bb47b0b4c4b1089ab@github.com>

VZ

unread,
Apr 7, 2026, 9:29:22 PM (2 days ago) Apr 7
to wx-...@googlegroups.com, Push

@vadz pushed 6 commits.

  • e6ccde6 Take multiple symbols in wx_check_symbol_exists_if_not_linux()
  • 2710f61 Use check_symbol_exists() for pthread functions
  • 61caeef Check for _timezone first under Windows
  • 94f5318 Skip some CMake checks that always fail under Windows
  • 9149976 Make checking for symbols more verbose in CMake
  • e54db67 Don't check for pthread_mutex_timedlock() under Apple systems


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26364/before/5b15fa245044c054c926bc9bb47b0b4c4b1089ab/after/e54db6712dc1ab1f5dfb3d1f4f90b72264471c90@github.com>

Maarten

unread,
Apr 8, 2026, 6:30:37 PM (2 days ago) Apr 8
to wx-...@googlegroups.com, Subscribed
MaartenBent left a comment (wxWidgets/wxWidgets#26364)

I think the CMake part looks fine, but I have to admit I did not check every single change in setup.cmake.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26364/c4210112189@github.com>

VZ

unread,
Apr 8, 2026, 9:05:19 PM (2 days ago) Apr 8
to wx-...@googlegroups.com, Subscribed

Merged #26364 into master.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26364/issue_event/24317936878@github.com>

Reply all
Reply to author
Forward
0 new messages