diff options
author | Daniel Black <daniel@mariadb.org> | 2020-10-07 16:06:20 +1100 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2020-10-21 19:11:02 +1100 |
commit | b4c225ac354686242b5336da84b7a758640936bd (patch) | |
tree | 73b5bb7e903a7e1b68a99d8f82a11a787396b15d /sql/log_event.cc | |
parent | 65b7f72b51dc81fbb6c2aca320e613b917bcc445 (diff) | |
download | mariadb-git-b4c225ac354686242b5336da84b7a758640936bd.tar.gz |
MDEV-23887: check_linker_flags correct for old cmake compatibility
It was only from CMake-3.14.0 that CMAKE_REQUIRED_LINK_OPTIONS
was used in CHECK_CXX_SOURCE_COMPILES. Without this, it could be
the case (as was on OSX) that a flag was never checked in
CHECK_CXX_SOURCE_COMPILES, the CHECK successfully passed, but
failed at link time.
As such we use CMAKE_REQUIRED_LIBRARIES to include the flags to check
as its compatible enough with the cmake versions for non-Windows
compilers/linkers.
Tested on x86_64 with:
* 3.11.4
* 3.17.4
Corrects: 7473e1841c630d86f1873a2a7afacb53955b3f6f
In the future:
* cmake >=3.14.0 can use CMAKE_REQUIRED_LINK_OPTIONS
* cmake >=3.18.0 can use CHECK_LINKER_FLAG (with policy CMP0057 NEW)
(e.g: commit c7ac2deff9a2c965887dcc67cbf2a3a7c3e0123d)
CMAKE_REQUIRED_LIBRARIES suggested by serg@mariadb.com
Reviewed-by: anel@mariadb.org
Diffstat (limited to 'sql/log_event.cc')
0 files changed, 0 insertions, 0 deletions