import libs = libspirv-headers%lib{spirv-headers}

# Upstream compile-checks of the C, C++, and C++11 headers.
#
./: exe{example}:     c{example}       $libs
./: exe{example-cpp}: cxx{example-cpp} $libs
./: exe{example11}:   cxx{example11}   $libs

# Matches upstream tests/CMakeLists.txt.
#
c.poptions += -DSPV_ENABLE_UTILITY_CODE
cxx.poptions += -DSPV_ENABLE_UTILITY_CODE

# example-cpp.cpp and example11.cpp declare their compile-check constants in
# an anonymous namespace purely to exercise the headers, so they are
# intentionally unused. Silence the resulting -Wunused-const-variable noise;
# excluded on MSVC, which doesn't understand this flag spelling.
if ($cxx.class != 'msvc')
  cxx.coptions += -Wno-unused-const-variable
