summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeCommands/target_include_directories/consumer.c
blob: 7fd694b089cc7d2bb5e602c63c742fef51c373c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

// 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
#  include "cxx_only.h"

#  ifndef CXX_ONLY_DEFINE
#    error Expected CXX_ONLY_DEFINE
#  endif
#else
#  include "c_only.h"

#  ifndef C_ONLY_DEFINE
#    error Expected C_ONLY_DEFINE
#  endif
#endif

int consumer_c()
{
  return 0;
}