Since the platform is selected at run time (e.g. xcb vs. Wayland), it
is not a good idea to decide at compile time what code is run. Another
example is on macOS, where having xcb libraries available will lead to
lauching the Xquartz whenever LyX is running.
With this patch, things are separated:
- the code is run when run-time platform is "xcb".
- the support code is compiled in when xcb header and libraries are
available.
The cmake code is courtesy of Kornel Benko.
Fixes ticket #13086.
(cherry picked from commit 18c310a8cf)
(cherry picked from commit f1fddd86ef)
(cherry picked from commit 3bc4554e57)
(cherry picked from commit 8c14748e78)
The warning says:
CMake Deprecation Warning at .../CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Spotted by Scott Kostyshak
(cherry picked from commit 8d79860ea7)
The original test was always successfull, even if the flag was invalid.
But checking for '-Wdeprecated-copy' instead yields to error if the warning does not exist.
Existent warning for 'deprecated-copy' implies that 'no-deprecated-copy' also exist.
The configuration variable is LYX_DEBUG_SANITIZE
which can have following values:
"NONE"
"ADDRESS" Use address sanitizer (previously used with the variable LYX_ASAN)
"UNSPECIFIED" Use unspecified sanitizer
Patch from P. De Visschere
Citing Patrick: As is stands the patch unsets the test-variable
from the cache and the test is performed for each cmake-run.
Otherwise after running cmake once the check is never run again, until
one throws away the cmakecache.txt, which I try to avoid.
I suppose that after time this check will be forgotten and if the issue
is solved (by an upgrade of the Apple clang compiler) this will pass
unnoticed.
1.) If building with external iconv, remove remnants of libiconv data
created if previousy used internal iconv
2.) Remove the variable HELP from cache to enable subsequent builds.
(Different variable-handling on new cmake (version >= 3.18))
3.) New macro to extract cmake-known-cxx-sts features
4.) Check for CXX11-features only for a subset of possibilities
known by the used cmake
/Wp64 was used to debug 64-bit incompatibilities. /W4 is used for warnings.
Don't enable /Wx to turn warnings into errors, as the dependencies won't build.