Path: blob/master/Tests/CMakeCommands/target_compile_definitions/consumer.c
3153 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_STUDIO_OR_XCODE4# 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#endif3637#if !LANG_IS_C_OR_CXX38# error Expected LANG_IS_C_OR_CXX39#endif4041void consumer_c(void)42{43}444546