https://github.com/Kitware/CMake
Raw File
Tip revision: 13e46189c7f3b39a26e9ca689bc029b7061d26a7 authored by Brad King on 16 November 2022, 14:42:03 UTC
CMake 3.25.0
Tip revision: 13e4618
foo.in
#include "doc1.h"
#include "foo.h"

#include <stdio.h>

int generated();
int wrapped();

#include "subdir/subdir.h"
#ifndef SUBDIR_DEF
# error SUBDIR_DEF not defined
#endif

int main ()
{
  if (generated()*wrapped()*doc() == 3*5*7)
    {
    FILE* fin = fopen("not_included.h", "r");
    if(fin)
      {
      fclose(fin);
      return 0;
      }
    else
      {
      return -2;
      }
    }

  return -1;
}

back to top