Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMake support for less #52

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

Add CMake support for less #52

wants to merge 22 commits into from

Conversation

rehdi93
Copy link

@rehdi93 rehdi93 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