Skip to content

Build system modernization and warning fix - #17

Open
dfateyev wants to merge 2 commits into
halon:masterfrom
dfateyev:update-cmake-build
Open

Build system modernization and warning fix#17
dfateyev wants to merge 2 commits into
halon:masterfrom
dfateyev:update-cmake-build

Conversation

@dfateyev

Copy link
Copy Markdown
Contributor

This PR fixes the compiler warning surfaced by a hardened build (GCC 16, -Wall) and modernizes the CMake rules.

  • Fix -Wsign-compare warning in address family check — AF_INET/AF_INET6 constants and addrinfo::ai_family are plain int, so declare proto as int instead of unsigned int.
  • Modernize CMake rules with GNUInstallDirs and target-based commands — include GNUInstallDirs so bin/man install locations follow platform conventions out of the box (we no longer need to pass -DMAN_INSTALL_DIR or similar; BIN_INSTALL_DIR/MAN_INSTALL_DIR are still honored as overrides for backward compatibility). Use FindThreads (Threads::Threads) instead of linking pthread directly, enable only the CXX language, and scope the Darwin BIND_8_COMPAT define to the target.

dfateyev added 2 commits July 30, 2026 00:05
AF_INET/AF_INET6 constants and addrinfo::ai_family are plain int,
so declare "proto" as int instead of unsigned int.

smtpping-1.1.5-build/smtpping-1.1.5/smtpping.cpp:558:45: warning:
comparison of integer expressions of different signedness:
‘int’ and ‘unsigned int’ [-Wsign-compare]
  558 |                 if (proto && res->ai_family != proto)
      |                              ~~~~~~~~~~~~~~~^~~~~~~~
- Enable only the CXX language needed
- Include GNUInstallDirs so bin/man install locations follow platform
  conventions out of the box
- BIN_INSTALL_DIR and MAN_INSTALL_DIR are still honored as command-line
  overrides if anyone still uses it
- Use FindThreads (Threads::Threads) instead of linking pthread directly
- Scope the Darwin BIND_8_COMPAT define to the target
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.

1 participant