magiblot / tvision

A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. Now cross-platform and with Unicode support.
Other
1.99k stars 150 forks source link

Allow turning off precompiled headers #73

Closed Michael137 closed 2 years ago

Michael137 commented 2 years ago

The documentation in the top-level CMakeLists.txt claims that precompiled header generation can be turned off using TV_OPTIMIZE_BUILD. However, this variable is currently unused.

This patch contains the following:

  1. Check the TV_OPTIMIZE_BUILD variable before creating the precompile headers targets
  2. Turn on TV_OPTIMIZE_BUILD by default (which will make precompiled headers build by default, as is already the case today); this aligns with the documentation in the top-level CMakeLists.txt

Testing

magiblot commented 2 years ago

Oops, my bad. I clearly missed this in https://github.com/magiblot/tvision/commit/6a635e347cf1afc4d64569436c3bc95d05ecf677. The point of that commit was, precisely, to ensure the project also builds without precompiled headers, but I forgot some of the necessary changes.

Thanks for the suggested fix. I will add a few changes, though (like removing lines 145 to 148, which due to the ON default, will now produce a warning by default on CMake versions older than 3.16, which doesn't make sense because the user hasn't done anything wrong).