ENH: fixes for borland compiler testing

This commit is contained in:
Bill Hoffman 2001-10-03 15:49:52 -04:00
parent e2eaa3efba
commit 8f652aad21
4 changed files with 20 additions and 3 deletions

View File

@ -26,6 +26,9 @@ IF(BUILD_TESTING)
# find programs used by testing
# look for the make program
IF( BCB_BIN_PATH )
FIND_PROGRAM(MAKEPROGRAM make ${BCB_BIN_PATH} )
ENDIF( BCB_BIN_PATH )
IF(NOT UNIX)
FIND_PROGRAM(MAKEPROGRAM msdev )
ENDIF(NOT UNIX)

View File

@ -40,7 +40,10 @@ IF (WIN32)
SOURCE_FILES(SRCS cmDSWWriter.cxx cmDSPWriter.cxx cmMSProjectGenerator.cxx)
SOURCE_FILES(SRCS cmBorlandMakefileGenerator.cpp)
IF(NOT UNIX)
SUBDIRS(MFCDialog)
IF( CMAKE_CXX_COMPILER MATCHES Borland )
ELSE (CMAKE_CXX_COMPILER MATCHES Borland )
SUBDIRS(MFCDialog)
ENDIF( CMAKE_CXX_COMPILER MATCHES Borland)
ENDIF(NOT UNIX)
ENDIF (WIN32)

View File

@ -324,7 +324,9 @@ int cmake::Generate(const std::vector<std::string>& args, bool buildMakefiles)
}
else
{
#if defined(_WIN32) && !defined(__CYGWIN__)
#if defined(__BORLANDC__)
gen = new cmBorlandMakefileGenerator;
#elif defined(_WIN32) && !defined(__CYGWIN__)
gen = new cmMSProjectGenerator;
#else
gen = new cmUnixMakefileGenerator;

View File

@ -61,7 +61,7 @@ int main (int argc, char *argv[])
// now build the test
std::string makeCommand = MAKEPROGRAM;
makeCommand += " ";
#if defined(_WIN32) && !defined(__CYGWIN__)
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__BORLANDC__)
makeCommand += executableName;
makeCommand += ".dsw /MAKE \"ALL_BUILD - Debug\" /REBUILD";
#else
@ -117,6 +117,15 @@ int main (int argc, char *argv[])
{
fullPath = cmSystemTools::CollapseFullPath(tryPath.c_str());
}
if(!cmSystemTools::FileExists(fullPath.c_str()))
{
std::cerr << "Could not find path to executable, perhaps it was not built: " <<
executableName << "\n";
std::cerr << "Error: " << fullPath.c_str() << " execution failed\n";
// return to the original directory
cmSystemTools::ChangeDirectory(cwd.c_str());
return 1;
}
if (!cmSystemTools::RunCommand(fullPath.c_str(), output))
{
std::cerr << "Error: " << fullPath.c_str() << " execution failed\n";