https://github.com/Kitware/CMake
Raw File
Tip revision: 19ff734e76a35d59eb0f973197cadb1c271c766c authored by Brad King on 13 January 2021, 12:58:18 UTC
CMake 3.19.3
Tip revision: 19ff734
bar.c
#include <stdio.h>

int foo();
class A
{
public:
  A() { this->i = foo(); }
  int i;
};

int main()
{
  A a;
  if (a.i == 21) {
    printf("passed foo is 21\n");
    return 0;
  }
  printf("Failed foo is not 21\n");
  return -1;
}
back to top