2 // This file contains a number of optional features that disable VC
3 // warnings regarding various items that VC turned into warnings that were
4 // not present in earlier versions. Some people may consider these superfluous
5 // or have already checked code to be sure it causes no trouble. So these
6 // warnings are disabled by default. To enable them, generate your projects
7 // with the feature set to 0.
10 feature(vc_avoid_crt_secure_warnings) {
11 specific(prop:microsoft) {
12 macros += _CRT_SECURE_NO_WARNINGS _CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_DEPRECATE
14 verbatim(cmake, macros, 1) {
16 " add_compile_definitions(_CRT_SECURE_NO_WARNINGS _CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_DEPRECATE)"
21 feature(!vc_scl_secure_warnings) {
22 specific(prop:microsoft) {
23 macros += _SCL_SECURE_NO_WARNINGS
25 verbatim(cmake, macros, 1) {
27 " add_compile_definitions(_SCL_SECURE_NO_WARNINGS)"
32 feature(vc_avoid_this_in_initializer_warnings) {
33 specific(prop:microsoft) {
34 DisableSpecificWarnings += 4355
36 verbatim(cmake, macros, 1) {
38 " add_compile_options(/wd4355)"
43 feature(vc_avoid_winsock_warnings) {
44 specific(prop:microsoft) {
45 macros += _WINSOCK_DEPRECATED_NO_WARNINGS
47 verbatim(cmake, macros, 1) {
49 " add_compile_definitions(_WINSOCK_DEPRECATED_NO_WARNINGS)"
54 feature(vc_avoid_hides_local_declaration) {
56 DisableSpecificWarnings += 4456
60 feature(vc_avoid_hides_global_declaration) {
62 DisableSpecificWarnings += 4459
66 feature(vc_avoid_hides_class_member) {
68 DisableSpecificWarnings += 4458