[cmake-commits] hoffman committed check_command_line.c.in NONE 1.3.2.1
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Oct 13 10:58:15 EDT 2006
Update of /cvsroot/CMake/CMake/Tests/CustomCommand
In directory public:/mounts/ram/cvs-serv5047/Tests/CustomCommand
Added Files:
Tag: CMake-2-4
check_command_line.c.in
Log Message:
ENH: merge files from main tree to 2.4
--- NEW FILE: check_command_line.c.in ---
#include <stdio.h>
#include <string.h>
const char* expected_arguments[] =
{
@EXPECTED_ARGUMENTS@ 0
};
int main(int argc, const char* argv[])
{
const char** a = argv+1;
const char** e = expected_arguments;
(void)argc;
for(;*a && *e; ++a, ++e)
{
if(strcmp(*a, *e) != 0)
{
fprintf(stderr, "Argument [%s] does not match expected [%s].\n",
*a, *e);
return 1;
}
else
{
/*printf("[%s]\n", *a);*/
}
}
if(*a || *e)
{
fprintf(stderr, "Number of arguments does not match expected.\n");
return 1;
}
printf("Command line escapes work!\n");
return 0;
}
More information about the Cmake-commits
mailing list