Lines Matching refs:FLAG
6 # add_cxx_compiler_flag(<FLAG> [<VARIANT>])
22 function(mangle_compiler_flag FLAG OUTPUT)
23 string(TOUPPER "HAVE_CXX_FLAG_${FLAG}" SANITIZED_FLAG)
30 function(add_cxx_compiler_flag FLAG)
31 mangle_compiler_flag("${FLAG}" MANGLED_FLAG)
33 set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${FLAG}")
34 check_cxx_compiler_flag("${FLAG}" ${MANGLED_FLAG})
41 …AGS${VARIANT} "${CMAKE_CXX_FLAGS${VARIANT}} ${BENCHMARK_CXX_FLAGS${VARIANT}} ${FLAG}" PARENT_SCOPE)
45 function(add_required_cxx_compiler_flag FLAG)
46 mangle_compiler_flag("${FLAG}" MANGLED_FLAG)
48 set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${FLAG}")
49 check_cxx_compiler_flag("${FLAG}" ${MANGLED_FLAG})
56 set(CMAKE_CXX_FLAGS${VARIANT} "${CMAKE_CXX_FLAGS${VARIANT}} ${FLAG}" PARENT_SCOPE)
57 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FLAG}" PARENT_SCOPE)
58 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${FLAG}" PARENT_SCOPE)
59 set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${FLAG}" PARENT_SCOPE)
60 set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${FLAG}" PARENT_SCOPE)
62 message(FATAL_ERROR "Required flag '${FLAG}' is not supported by the compiler")
66 function(check_cxx_warning_flag FLAG)
67 mangle_compiler_flag("${FLAG}" MANGLED_FLAG)
71 set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror ${FLAG}")
72 check_cxx_compiler_flag("${FLAG}" ${MANGLED_FLAG})