diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-10-03 19:49:52 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-10-03 19:49:52 (GMT) |
commit | 8f652aad2176055ff7f76e76fcb14389bafcc543 (patch) | |
tree | 27cf83147f35dafce3563197a5dc41836c5ca252 /Source | |
parent | e2eaa3efba61a39fcf5e69d0773d9c4aad653d84 (diff) | |
download | CMake-8f652aad2176055ff7f76e76fcb14389bafcc543.zip CMake-8f652aad2176055ff7f76e76fcb14389bafcc543.tar.gz CMake-8f652aad2176055ff7f76e76fcb14389bafcc543.tar.bz2 |
ENH: fixes for borland compiler testing
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Source/cmake.cxx | 4 | ||||
-rw-r--r-- | Source/cmaketest.cxx | 11 |
3 files changed, 17 insertions, 3 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 2c4410b..f51f358 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -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) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 18235ee..ff99837 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -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; diff --git a/Source/cmaketest.cxx b/Source/cmaketest.cxx index 8a6b5df..8756601 100644 --- a/Source/cmaketest.cxx +++ b/Source/cmaketest.cxx @@ -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"; |