summaryrefslogtreecommitdiffstats
path: root/Source/cmCreateTestSourceList.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-07-31 15:07:09 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-07-31 15:07:09 (GMT)
commit1538956b7f3fc82156898e9449a8959076e1c106 (patch)
treeb139ddb7a2a313a9f5d7ac85d442cc64598ecc63 /Source/cmCreateTestSourceList.cxx
parentb5cf03b5e742dee22f9d7977148b85e73a074b02 (diff)
downloadCMake-1538956b7f3fc82156898e9449a8959076e1c106.zip
CMake-1538956b7f3fc82156898e9449a8959076e1c106.tar.gz
CMake-1538956b7f3fc82156898e9449a8959076e1c106.tar.bz2
fixed support for C test programs
Diffstat (limited to 'Source/cmCreateTestSourceList.cxx')
-rw-r--r--Source/cmCreateTestSourceList.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmCreateTestSourceList.cxx b/Source/cmCreateTestSourceList.cxx
index b61c8f7..cf086ae 100644
--- a/Source/cmCreateTestSourceList.cxx
+++ b/Source/cmCreateTestSourceList.cxx
@@ -70,7 +70,7 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
// Name of the test driver
// 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.");
return false;
@@ -146,11 +146,11 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
"// Create map\n"
"\n"
"typedef int (*MainFuncPointer)(int , char*[]);\n"
- "struct functionMapEntry\n"
+ "typedef struct\n"
"{\n"
" const char* name;\n"
" MainFuncPointer func;\n"
- "};\n"
+ "} functionMapEntry;\n"
"\n"
"functionMapEntry cmakeGeneratedFunctionMapEntries[] = {\n";
@@ -291,7 +291,7 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& argsIn)
cfile.SetIsAnAbstractClass(false);
cfile.SetName(cmSystemTools::GetFilenameWithoutExtension(args[1]).c_str(),
m_Makefile->GetCurrentOutputDirectory(),
- "cxx",
+ cmSystemTools::GetFilenameExtension(args[1]).c_str()+1,
false);
m_Makefile->AddSource(cfile);
sourceListValue = args[1];