Skip to content

Bugfix/cmake options - #112

Closed
blacknode wants to merge 3 commits into
UndernetIRC:mainfrom
blacknode:bugfix/cmake-options
Closed

blacknode wants to merge 3 commits into
UndernetIRC:mainfrom
blacknode:bugfix/cmake-options

Conversation

@blacknode

Copy link
Copy Markdown

No description provided.

claude and others added 3 commits September 7, 2026 13:46
Replace configure.ac, acinclude.m4, the three Makefile.am files, autogen.sh
and version.c.SH with a CMake build. Every configure switch keeps an
equivalent, the generated config.h is the same set of macros, and the six
unit tests now run under CTest.

Layout:

  CMakeLists.txt              project version, build type, config.h, summary
  cmake/IrcuVersion.cmake     BASE_VERSION/RELEASE/PATCHLEVEL from project()
  cmake/ConfigureChecks.cmake headers, functions, type sizes, va_copy,
                              non-blocking sockets, signals, socklen_t
  cmake/IrcuOptions.cmake     the --enable/--with switches as IRCU_* cache
                              variables, plus event engine selection
  cmake/IrcuTLS.cmake         openssl/gnutls/libtls/none backend detection
  cmake/IrcuPaths.cmake       DPATH/CPATH/LPATH/SPATH with chroot rewriting
  cmake/config.h.cmake.in     config.h template
  cmake/GenerateVersion.cmake the version.c.SH port
  cmake/*InstallHooks.cmake.in the install-exec-hook port
  ircd/CMakeLists.txt         server, umkpasswd, convert-conf, table_gen
  ircd/test/CMakeLists.txt    unit tests registered with CTest

The build is out-of-tree only, exports compile_commands.json, and ships
CMakePresets.json with default/dev/asan/release/no-tls configurations.
CI now builds a matrix over the TLS backends and a debug configuration.

Behaviour differences worth calling out:

- Non-blocking sockets are detected by compiling the call instead of running
  it, so POSIX fcntl(O_NONBLOCK) is now selected where it is supported. The
  obsolete autoconf test depended on AC_TYPE_SIGNAL, which autoconf 2.71
  removed, and had been silently falling back to ioctl(FIONBIO).
- version.c is generated with file(MD5) rather than by running umkpasswd, so
  it no longer needs umkpasswd linked first, and is regenerated when a source
  changes rather than on every invocation.
- The fallback include/patchlist.h is written into the build tree instead of
  the source tree; one written by ircd-patch still takes precedence.
- -DNDEBUG is stripped from the Release build types so that assertions stay
  governed solely by IRCU_ENABLE_ASSERTS, as they were under configure.
- Re-installing no longer risks clobbering the installed binary: a stale
  symlink from a previous install is removed before the new binary lands.

INSTALL documents every option and carries a configure-to-cmake table.
@blacknode blacknode closed this Sep 8, 2026
@blacknode
blacknode deleted the bugfix/cmake-options branch September 8, 2026 21:17
@blacknode

Copy link
Copy Markdown
Author

sorry, wrong repo xD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants