Commit graph

9 commits

Author SHA1 Message Date
Sergei Golubchik
4771ae4b22 Merge branch 'github/10.1' into 10.2 2018-02-06 14:50:50 +01:00
Sergei Golubchik
0c25e58db6 correctly detect unsupported compiler flags
in gcc `-Wno-unsupported-something` will not be an error or even a warning,
so cmake will think the flag is supported. But if there's any other
warning during compilation, for any reason, unknown option will
be a warning too. Or an error when -Werror, even if that "other warning"
would not be an error on itself.

So we need to detect whether `-Wno-unsupported-something` is *really*
supported. Luckily, `-Wunsupported-something` will always fail with an
error.

So, whenever there's a need to detect if -Wno-something is supported,
test -Wsomething instead.
2018-02-06 12:53:01 +01:00
Sergei Golubchik
932646b1ff Merge branch '10.1' into 10.2 2016-06-30 16:38:05 +02:00
Sergei Golubchik
3361aee591 Merge branch '10.0' into 10.1 2016-06-28 22:01:55 +02:00
Sergei Golubchik
e4b88235b5 cmake: rename symbols used internally by check_compiler_flag.cmake
(that is MY_CHECK_C_COMPILER_FLAG, MY_CHECK_CXX_COMPILER_FLAG,
MY_CHECK_AND_SET_COMPILER_FLAG)

This is to have a clear "internal" name prefix and to avoid
mixing them with hand-named symbols
2015-11-23 16:02:56 +01:00
Sergei Golubchik
e74f91dfd7 cmake: always use the same function to test for compiler flags
Fix all cmake tests (including plugin) to use
MY_CHECK_AND_SET_COMPILER_FLAG. And fix that function
to be compatible with cmake 3.0. This way flag checks
are correctly cached (even in cmake 3.0) and properly reused.
2015-09-04 10:32:02 +02:00
Sergei Golubchik
899c5c32cf smarter MY_CHECK_AND_SET_COMPILER_FLAG
If a flag is supported only for C or C++ - add it to the
corresponding compiler option list. Old behavior was to
add always to both, but only if supported in both.
2015-04-10 13:39:29 +02:00
Alexey Botchkov
52a1b5a8c2 MY_CHECK_AND_SET_COMPILER_FLAG changes
* watch for "redefined macro" warning
* don't enable -D_FORTIFY_SOURCE=2 in debug builds (it requires -O)
2015-03-11 13:05:03 +04:00
Sergei Golubchik
6c0e3ef450 cmake cleanup: use MY_CHECK_AND_SET_COMPILER_FLAG.
move MY_CHECK_C_COMPILER_FLAG and MY_CHECK_CXX_COMPILER_FLAG
to a separate file, introduce MY_CHECK_AND_SET_COMPILER_FLAG,
use it where possible.
2014-06-26 11:54:13 +02:00