diff options
author | Brad King <brad.king@kitware.com> | 2002-11-21 15:11:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-11-21 15:11:46 (GMT) |
commit | 9a98c1680340660502318e192edcc799e1c64302 (patch) | |
tree | 1aee4d8e33a84d6ad9ada783346cd2ac98451ba0 /Modules/CheckVariableExists.c | |
parent | a7da3d4efffa930d50d6db8f549850d4d3ace4b3 (diff) | |
download | CMake-9a98c1680340660502318e192edcc799e1c64302.zip CMake-9a98c1680340660502318e192edcc799e1c64302.tar.gz CMake-9a98c1680340660502318e192edcc799e1c64302.tar.bz2 |
ENH: Added CHECK_VARIABLE_EXISTS macro.
Diffstat (limited to 'Modules/CheckVariableExists.c')
-rw-r--r-- | Modules/CheckVariableExists.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Modules/CheckVariableExists.c b/Modules/CheckVariableExists.c new file mode 100644 index 0000000..e4d1e8d --- /dev/null +++ b/Modules/CheckVariableExists.c @@ -0,0 +1,16 @@ +#ifdef CHECK_VARIABLE_EXISTS + +extern int CHECK_VARIABLE_EXISTS; + +int main() +{ + int* p; + p = &CHECK_VARIABLE_EXISTS; + return 0; +} + +#else /* CHECK_VARIABLE_EXISTS */ + +# error "CHECK_VARIABLE_EXISTS has to specify the variable" + +#endif /* CHECK_VARIABLE_EXISTS */ |