diff options
author | Brad King <brad.king@kitware.com> | 2008-06-04 16:10:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-06-04 16:10:59 (GMT) |
commit | 306e3e573fe409c0818fa069fd7e625c19713ed9 (patch) | |
tree | 3ae92cbbe3ec500a83632d45259e4a47018b134b /Tests/CustomCommand/wrapper.cxx | |
parent | 7fc72e6471f641a9c08fe85c2c7d24eda75d10db (diff) | |
download | CMake-306e3e573fe409c0818fa069fd7e625c19713ed9.zip CMake-306e3e573fe409c0818fa069fd7e625c19713ed9.tar.gz CMake-306e3e573fe409c0818fa069fd7e625c19713ed9.tar.bz2 |
ENH: Add test for make variable replacement in a custom command with the VERBATIM option.
Diffstat (limited to 'Tests/CustomCommand/wrapper.cxx')
-rw-r--r-- | Tests/CustomCommand/wrapper.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/CustomCommand/wrapper.cxx b/Tests/CustomCommand/wrapper.cxx index 3ad0794..97912de 100644 --- a/Tests/CustomCommand/wrapper.cxx +++ b/Tests/CustomCommand/wrapper.cxx @@ -1,4 +1,5 @@ #include <stdio.h> +#include <string.h> int main(int argc, char *argv[]) { @@ -14,5 +15,16 @@ int main(int argc, char *argv[]) fp = fopen(argv[2],"w"); fprintf(fp,"int wrapped_help() { return 5; }\n"); fclose(fp); +#ifdef CMAKE_INTDIR + const char* cfg = (argc >= 4)? argv[3] : ""; + if(strcmp(cfg, CMAKE_INTDIR) != 0) + { + fprintf(stderr, + "Did not receive expected configuration argument:\n" + " expected [" CMAKE_INTDIR "]\n" + " received [%s]\n", cfg); + return 1; + } +#endif return 0; } |