Files
CMake/Tests/CMakeCommands/target_compile_definitions/consumer.c
T
Robert Maynard 808b818063 Genex: CompileLang and CompileLangAndId now match against a list of ids
This allows for expressions such as:

 $<COMPILE_LANG_AND_ID, CXX, GNU, Clang>
2019-06-03 10:20:23 -04:00

45 lines
816 B
C

// Visual Studio allows only one set of flags for C and C++.
// In a target using C++ we pick the C++ flags even for C sources.
#ifdef TEST_LANG_DEFINES_FOR_VISUAL_STUDIO_OR_XCODE
# ifndef CONSUMER_LANG_CXX
# error Expected CONSUMER_LANG_CXX
# endif
# ifdef CONSUMER_LANG_C
# error Unexpected CONSUMER_LANG_C
# endif
# if !LANG_IS_CXX
# error Expected LANG_IS_CXX
# endif
# if LANG_IS_C
# error Unexpected LANG_IS_C
# endif
#else
# ifdef CONSUMER_LANG_CXX
# error Unexpected CONSUMER_LANG_CXX
# endif
# ifndef CONSUMER_LANG_C
# error Expected CONSUMER_LANG_C
# endif
# if !LANG_IS_C
# error Expected LANG_IS_C
# endif
# if LANG_IS_CXX
# error Unexpected LANG_IS_CXX
# endif
#endif
#if !LANG_IS_C_OR_CXX
# error Expected LANG_IS_C_OR_CXX
#endif
void consumer_c()
{
}