diff options
author | Brad King <brad.king@kitware.com> | 2008-01-14 14:20:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-14 14:20:58 (GMT) |
commit | 8262ccfd4efddd4928070c637ef7c414633b4b1e (patch) | |
tree | c276e3f4ec61422534586a008739bd668e1b9ce3 /Tests/Preprocess/preprocess.h.in | |
parent | 2c42f755225c0cb30f04f07c9f5bd23f65ad0bd2 (diff) | |
download | CMake-8262ccfd4efddd4928070c637ef7c414633b4b1e.zip CMake-8262ccfd4efddd4928070c637ef7c414633b4b1e.tar.gz CMake-8262ccfd4efddd4928070c637ef7c414633b4b1e.tar.bz2 |
ENH: Create COMPILE_DEFINITIONS property for targets and source files. Create <config>_COMPILE_DEFINITIONS property as per-configuration version. Add Preprocess test to test the feature. Document limitations on Xcode and VS6 generators.
Diffstat (limited to 'Tests/Preprocess/preprocess.h.in')
-rw-r--r-- | Tests/Preprocess/preprocess.h.in | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/Preprocess/preprocess.h.in b/Tests/Preprocess/preprocess.h.in new file mode 100644 index 0000000..3e1c7a0 --- /dev/null +++ b/Tests/Preprocess/preprocess.h.in @@ -0,0 +1,16 @@ +/* Define configured macros. */ +#define STRING_VALUE "@STRING_VALUE@" +#define EXPR @EXPR@ +#cmakedefine PREPROCESS_XCODE +#cmakedefine PREPROCESS_VS6 + +#ifdef PREPROCESS_VS6 +# define FILE_PATH "@FILE_PATH@" +# define TARGET_PATH "@TARGET_PATH@" +#endif + +/* Declarations and macros shared by all sources. */ +#define TO_STRING(x) TO_STRING0(x) +#define TO_STRING0(x) #x + +static int f(int i) { return i*3; } |