Skip to content

Conversation

@red-rj
Copy link

@red-rj red-rj commented Mar 19, 2020

For CMake 3.8 and up, as an alternative for autoconf or the Windows makefile.

  • defines.cmake.in is configured by CMake into defines.h.
  • user preferences can be controlled via CMake cmd. line or CMakeCache.txt.
  • handles dependency checking and defines HAVE_ macros* like autoconf, but only those that affect less.

*Note: macros for stuff defined in the C standard, like HAVE_ANSI_PROTOS, HAVE_CONST, HAVE_STDLIB_H, are hard-coded to 1 in defines.cmake.in. I assume most people using CMake aren't also using an ancient compiler.

I tested it on windows 10 and linux mint.

Other improvements:

  • [Windows] use USERPROFILE as HOME, if not defined.
  • [Windows] fixed a crash on use_logfile, due to bad permission bits.
  • [Windows] use ReplaceFileA on save_cmdhist, atomically replaces lesshist and preserves file attributes.
  • add EDIT_PROTO config, controls the default editor prompt if LESSEDIT is not set.
  • add HAVE_LANGINFO check for langinfo.h.

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