blob: ebb2530ae54137468b2dff1a826d53fcd283c796 [file] [log] [blame]
Jonas Hahnfeld5af381a2017-11-29 19:31:48 +00001include(CheckCXXCompilerFlag)
2
Jonas Hahnfelddc23c832019-08-15 13:11:50 +00003check_cxx_compiler_flag(-Wall OPENMP_HAVE_WALL_FLAG)
4check_cxx_compiler_flag(-Werror OPENMP_HAVE_WERROR_FLAG)
5
6# Additional warnings that are not enabled by -Wall.
7check_cxx_compiler_flag(-Wcast-qual OPENMP_HAVE_WCAST_QUAL_FLAG)
8check_cxx_compiler_flag(-Wformat-pedantic OPENMP_HAVE_WFORMAT_PEDANTIC_FLAG)
Jonas Hahnfeldd2ae0c42019-08-15 13:26:55 +00009check_cxx_compiler_flag(-Wimplicit-fallthrough OPENMP_HAVE_WIMPLICIT_FALLTHROUGH_FLAG)
Jonas Hahnfelddc23c832019-08-15 13:11:50 +000010check_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.
13check_cxx_compiler_flag(-Wno-extra OPENMP_HAVE_WNO_EXTRA_FLAG)
14check_cxx_compiler_flag(-Wno-pedantic OPENMP_HAVE_WNO_PEDANTIC_FLAG)
15check_cxx_compiler_flag(-Wno-maybe-uninitialized OPENMP_HAVE_WNO_MAYBE_UNINITIALIZED_FLAG)
Jonas Hahnfeld5af381a2017-11-29 19:31:48 +000016
Michal Gornye9d42672018-12-11 15:39:22 +000017check_cxx_compiler_flag(-std=gnu++11 OPENMP_HAVE_STD_GNUPP11_FLAG)
18check_cxx_compiler_flag(-std=c++11 OPENMP_HAVE_STD_CPP11_FLAG)