Path: blob/master/Tests/CMakeCommands/target_compile_options/consumer.c
3152 views
1// Visual Studio allows only one set of flags for C and C++.2// In a target using C++ we pick the C++ flags even for C sources.3#ifdef TEST_LANG_DEFINES_FOR_VISUAL_STUDIO4# ifndef CONSUMER_LANG_CXX5# error Expected CONSUMER_LANG_CXX6# endif78# ifdef CONSUMER_LANG_C9# error Unexpected CONSUMER_LANG_C10# endif1112# if !LANG_IS_CXX13# error Expected LANG_IS_CXX14# endif1516# if LANG_IS_C17# error Unexpected LANG_IS_C18# endif19#else20# ifdef CONSUMER_LANG_CXX21# error Unexpected CONSUMER_LANG_CXX22# endif2324# ifndef CONSUMER_LANG_C25# error Expected CONSUMER_LANG_C26# endif2728# if !LANG_IS_C29# error Expected LANG_IS_C30# endif3132# if LANG_IS_CXX33# error Unexpected LANG_IS_CXX34# endif35#endif3637void consumer_c(void)38{39}404142