[CMAKE] MSVC cmake settings improvements. 1232/head
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 12 Jan 2019 15:57:51 +0000 (16:57 +0100)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 12 Jan 2019 17:09:51 +0000 (18:09 +0100)
commit5e673f311854a125c3347ae00c924d347972003c
treefbba7152fa70b19d52e073eec80f1852bd400f88
parent363f5f26b1570d8f1e13ea09d84e2acfe2ba184a
[CMAKE] MSVC cmake settings improvements.

- Always use string pooling when building: this helps reducing the
  size of the binaries due to string redundancy coming from the usage
  of __FILE__ / __RELFILE__ in the debugging helper macros. Note also
  that GCC builds use string pooling by default.

- Use suitable add_compile_flags() command.
- Add some explanative comments for some settings.

Some numbers (obtained with my local builds):

Before / After => Reduction
===========================

freeldr.sys  :  443 KB (  453.632 bytes) /  364 KB (  372.736 bytes) => ~ 18%
win32k.sys   : 1877 KB (1.922.048 bytes) / 1562 KB (1.599.488 bytes) => ~ 17%
ntoskrnl.exe : 2253 KB (2.307.072 bytes) / 1902 KB (1.947.136 bytes) => ~ 15.6%
kernel32.dll : 3008 KB (3.080.192 bytes) / 2906 KB (2.975.744 bytes) => ~ 3.4%
sdk/cmake/config-amd64.cmake
sdk/cmake/config-arm.cmake
sdk/cmake/msvc.cmake