https://github.com/Kitware/CMake
Revision 00a2dc4d2f7bb5dcf2a4654863d7f74a3acb6676 authored by Kitware Robot on 11 September 2021, 04:01:17 UTC, committed by Kitware Robot on 11 September 2021, 04:01:17 UTC
1 parent 9488f8a
Raw File
Tip revision: 00a2dc4d2f7bb5dcf2a4654863d7f74a3acb6676 authored by Kitware Robot on 11 September 2021, 04:01:17 UTC
CMake Nightly Date Stamp
Tip revision: 00a2dc4
CheckVariableExists.c
#ifdef CHECK_VARIABLE_EXISTS

extern int CHECK_VARIABLE_EXISTS;

#  ifdef __CLASSIC_C__
int main()
{
  int ac;
  char* av[];
#  else
int main(int ac, char* av[])
{
#  endif
  if (ac > 1000) {
    return *av[0];
  }
  return CHECK_VARIABLE_EXISTS;
}

#else /* CHECK_VARIABLE_EXISTS */

#  error "CHECK_VARIABLE_EXISTS has to specify the variable"

#endif /* CHECK_VARIABLE_EXISTS */
back to top