summaryrefslogtreecommitdiff
path: root/Tests/CustomCommand
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-06-05 10:01:16 -0400
committerBrad King <brad.king@kitware.com>2008-06-05 10:01:16 -0400
commit3ecfb5f7e8e57d4c273d25eeaaecffea2cf51d09 (patch)
treead6d26ed6e250355e58b63cdd3d92aa81534fa36 /Tests/CustomCommand
parenta9a33a5c5e1b2d396e6844bcdb99f7a72e26b61e (diff)
downloadcmake-3ecfb5f7e8e57d4c273d25eeaaecffea2cf51d09.tar.gz
BUG: Fix new custom command with make-var expansion test on VS6. The VS6 IDE adds some extra characters to the variable value during expansion.
Diffstat (limited to 'Tests/CustomCommand')
-rw-r--r--Tests/CustomCommand/wrapper.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/Tests/CustomCommand/wrapper.cxx b/Tests/CustomCommand/wrapper.cxx
index 97912deb90..93cb079fe4 100644
--- a/Tests/CustomCommand/wrapper.cxx
+++ b/Tests/CustomCommand/wrapper.cxx
@@ -16,12 +16,18 @@ int main(int argc, char *argv[])
fprintf(fp,"int wrapped_help() { return 5; }\n");
fclose(fp);
#ifdef CMAKE_INTDIR
+ /* The VS6 IDE passes a leading ".\\" in its variable expansion. */
+# if defined(_MSC_VER) && _MSC_VER == 1200
+# define CFG_DIR ".\\" CMAKE_INTDIR
+# else
+# define CFG_DIR CMAKE_INTDIR
+# endif
const char* cfg = (argc >= 4)? argv[3] : "";
- if(strcmp(cfg, CMAKE_INTDIR) != 0)
+ if(strcmp(cfg, CFG_DIR) != 0)
{
fprintf(stderr,
"Did not receive expected configuration argument:\n"
- " expected [" CMAKE_INTDIR "]\n"
+ " expected [" CFG_DIR "]\n"
" received [%s]\n", cfg);
return 1;
}