fixed support for C test programs
This commit is contained in:
parent
b5cf03b5e7
commit
1538956b7f
|
@ -70,7 +70,7 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
|
||||||
|
|
||||||
// Name of the test driver
|
// Name of the test driver
|
||||||
// make sure they specified an extension
|
// make sure they specified an extension
|
||||||
if (cmSystemTools::GetFilenameExtension(*i).size() < 1)
|
if (cmSystemTools::GetFilenameExtension(*i).size() < 2)
|
||||||
{
|
{
|
||||||
this->SetError("You must specify a file extenion for the test driver file.");
|
this->SetError("You must specify a file extenion for the test driver file.");
|
||||||
return false;
|
return false;
|
||||||
|
@ -146,11 +146,11 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
|
||||||
"// Create map\n"
|
"// Create map\n"
|
||||||
"\n"
|
"\n"
|
||||||
"typedef int (*MainFuncPointer)(int , char*[]);\n"
|
"typedef int (*MainFuncPointer)(int , char*[]);\n"
|
||||||
"struct functionMapEntry\n"
|
"typedef struct\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" const char* name;\n"
|
" const char* name;\n"
|
||||||
" MainFuncPointer func;\n"
|
" MainFuncPointer func;\n"
|
||||||
"};\n"
|
"} functionMapEntry;\n"
|
||||||
"\n"
|
"\n"
|
||||||
"functionMapEntry cmakeGeneratedFunctionMapEntries[] = {\n";
|
"functionMapEntry cmakeGeneratedFunctionMapEntries[] = {\n";
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
|
||||||
cfile.SetIsAnAbstractClass(false);
|
cfile.SetIsAnAbstractClass(false);
|
||||||
cfile.SetName(cmSystemTools::GetFilenameWithoutExtension(args[1]).c_str(),
|
cfile.SetName(cmSystemTools::GetFilenameWithoutExtension(args[1]).c_str(),
|
||||||
m_Makefile->GetCurrentOutputDirectory(),
|
m_Makefile->GetCurrentOutputDirectory(),
|
||||||
"cxx",
|
cmSystemTools::GetFilenameExtension(args[1]).c_str()+1,
|
||||||
false);
|
false);
|
||||||
m_Makefile->AddSource(cfile);
|
m_Makefile->AddSource(cfile);
|
||||||
sourceListValue = args[1];
|
sourceListValue = args[1];
|
||||||
|
|
Loading…
Reference in New Issue