https://github.com/Kitware/CMake
Raw File
Tip revision: 1f25aa1a0ac61a0b3d5b0c4e2abc98c49cd159a5 authored by Brad King on 29 January 2024, 20:01:32 UTC
CMake 3.28.2
Tip revision: 1f25aa1
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