Jonas Hahnfeld | 5af381a | 2017-11-29 19:31:48 +0000 | [diff] [blame] | 1 | include(CheckCXXCompilerFlag) |
| 2 | |
Jonas Hahnfeld | dc23c83 | 2019-08-15 13:11:50 +0000 | [diff] [blame] | 3 | check_cxx_compiler_flag(-Wall OPENMP_HAVE_WALL_FLAG) |
| 4 | check_cxx_compiler_flag(-Werror OPENMP_HAVE_WERROR_FLAG) |
| 5 | |
| 6 | # Additional warnings that are not enabled by -Wall. |
| 7 | check_cxx_compiler_flag(-Wcast-qual OPENMP_HAVE_WCAST_QUAL_FLAG) |
| 8 | check_cxx_compiler_flag(-Wformat-pedantic OPENMP_HAVE_WFORMAT_PEDANTIC_FLAG) |
Jonas Hahnfeld | d2ae0c4 | 2019-08-15 13:26:55 +0000 | [diff] [blame] | 9 | check_cxx_compiler_flag(-Wimplicit-fallthrough OPENMP_HAVE_WIMPLICIT_FALLTHROUGH_FLAG) |
Jonas Hahnfeld | dc23c83 | 2019-08-15 13:11:50 +0000 | [diff] [blame] | 10 | check_cxx_compiler_flag(-Wsign-compare OPENMP_HAVE_WSIGN_COMPARE_FLAG) |
| 11 | |
| 12 | # Warnings that we want to disable because they are too verbose or fragile. |
| 13 | check_cxx_compiler_flag(-Wno-extra OPENMP_HAVE_WNO_EXTRA_FLAG) |
| 14 | check_cxx_compiler_flag(-Wno-pedantic OPENMP_HAVE_WNO_PEDANTIC_FLAG) |
| 15 | check_cxx_compiler_flag(-Wno-maybe-uninitialized OPENMP_HAVE_WNO_MAYBE_UNINITIALIZED_FLAG) |
Jonas Hahnfeld | 5af381a | 2017-11-29 19:31:48 +0000 | [diff] [blame] | 16 | |
Michal Gorny | e9d4267 | 2018-12-11 15:39:22 +0000 | [diff] [blame] | 17 | check_cxx_compiler_flag(-std=gnu++11 OPENMP_HAVE_STD_GNUPP11_FLAG) |
| 18 | check_cxx_compiler_flag(-std=c++11 OPENMP_HAVE_STD_CPP11_FLAG) |