mariadb/cmake
Daniel Black b4c225ac35 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: 7473e1841c

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
2020-10-21 19:11:02 +11:00
..
build_configurations MDEV-23114 AUTH_PAM plugin can not be disabled when using mysql_release config 2020-07-07 17:59:47 +03:00
os MDEV-15961: Fix stacktraces under FreeBSD (aarch64) 2020-07-28 11:10:25 +10:00
abi_check.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
bison.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
build_depends.cmake MDEV-7066 No Source RPMs ... (and so no "yum-builddep MariaDB-server" either) 2019-03-27 22:51:37 +01:00
bzip2.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
cat.cmake Update FSF Address 2019-05-11 21:29:06 +03:00
character_sets.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
check_compiler_flag.cmake MDEV-17103 MY_CHECK_{C,CXX}_COMPILER_FLAG do not work on with localized gcc 2019-06-05 19:42:55 +02:00
check_linker_flag.cmake MDEV-23887: check_linker_flags correct for old cmake compatibility 2020-10-21 19:11:02 +11:00
check_minimal_version.cmake Update FSF Address 2019-05-11 21:29:06 +03:00
cmake_parse_arguments.cmake Update FSF Address 2019-05-11 21:29:06 +03:00
compile_flags.cmake Update FSF Address 2019-05-11 21:29:06 +03:00
configurable_file_content.in Updated/added copyright headers 2011-06-30 17:46:53 +02:00
configure.pl mtr: use env for perl 2020-06-23 03:24:46 +02:00
cpack_deb.cmake simplify CMakeLists.txt for cassandra/connect engines 2013-09-25 19:32:14 +02:00
cpack_rpm.cmake MDEV-21437 MariaDB's SUSE/SLES packages don't "provide" all of the same capabilities as the platform's default packages 2020-05-05 19:37:01 +02:00
cpack_source_ignore_files.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
CPackRPM.cmake RPM: 2014-02-19 21:40:20 +01:00
cpu_info.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
create_initial_db.cmake.in Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
ctest.cmake Revert "MDEV-16075: Workaround to run MTR test suite for make test" 2018-06-20 23:27:23 +02:00
do_abi_check.cmake Update FSF Address 2019-05-11 21:29:06 +03:00
dtrace.cmake Disable dtrace probes on Windows. 2020-06-20 01:02:05 +02:00
dtrace_prelink.cmake Update FSF Address 2019-05-11 21:29:06 +03:00
for_clients.cmake MDEV-9833 - fix mysql_config --libs for weird cases, where mysqlclient link dependencies contain flags instead of libraries (like -pthread rather than -lpthread) 2016-02-22 12:42:28 +01:00
info_bin.cmake Update FSF Address 2019-05-11 21:29:06 +03:00
info_macros.cmake.in Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
info_src.cmake Update FSF Address 2019-05-11 21:29:06 +03:00
install_layout.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
install_macros.cmake MDEV-22078 MariaDB-compat missing from MariaDB 10.4 CentOS 8 Yum Repo 2020-04-27 09:11:29 +02:00
jemalloc.cmake Merge branch '10.0' into 10.1 2016-02-23 21:35:05 +01:00
libutils.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
lz4.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
lzma.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
lzo.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
maintainer.cmake MDEV-19740: Have MYSQL_MAINTAINER_MODE only enable -Werror 2020-04-01 15:16:11 +03:00
make_dist.cmake.in Update FSF Address 2019-05-11 21:29:06 +03:00
merge_archives_unix.cmake.in Update FSF Address 2019-05-11 21:29:06 +03:00
mysql_add_executable.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
mysql_version.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
package_name.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
pcre.cmake MDEV-13412 main.func_regexp_pcre fails in buildbot on ppc64le 2017-10-09 17:51:34 +02:00
plugin.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
readline.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
sign.cmake.in Build improvements and cleanups. 2017-09-08 18:22:15 +00:00
snappy.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
ssl.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
stack_direction.c Update FSF Address 2019-05-11 21:29:06 +03:00
systemd.cmake MDEV-19481 mariadb-10.3.15-linux-systemd-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' and 'GLIBCXX_3.4.21' not found 2019-07-04 18:19:52 +02:00
tags.cmake Update FSF Address 2019-05-11 21:29:06 +03:00
versioninfo.rc.in Update FSF Address 2019-05-11 21:29:06 +03:00
win_compatibility.manifest MDEV-12207 Include windows compatibility manifest into executable to make GetVersionEx work correctly 2017-03-08 11:20:03 +00:00
wsrep.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
zlib.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00