diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-03-29 15:06:30 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-03-29 15:06:30 (GMT) |
commit | 8b3b49a010219eeba327d882e1fe38f721b6bed8 (patch) | |
tree | 095e639d4828f7a0e4e905c1f14d5fe32369e923 /Source/cmaketest.cxx | |
parent | 627ab62ce093d8f50ed0ba50a1dd1081165b19f1 (diff) | |
download | CMake-8b3b49a010219eeba327d882e1fe38f721b6bed8.zip CMake-8b3b49a010219eeba327d882e1fe38f721b6bed8.tar.gz CMake-8b3b49a010219eeba327d882e1fe38f721b6bed8.tar.bz2 |
ENH: major change, the cmMakefile now contains a master list of cmSourceFile objects, the source lists reference the list via pointers, also you can now set properties on a file, like compile flags, abstract, etc.
Diffstat (limited to 'Source/cmaketest.cxx')
-rw-r--r-- | Source/cmaketest.cxx | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/Source/cmaketest.cxx b/Source/cmaketest.cxx index 0227b3d..37a3d98 100644 --- a/Source/cmaketest.cxx +++ b/Source/cmaketest.cxx @@ -16,6 +16,7 @@ =========================================================================*/ #include "cmaketest.h" #include "cmSystemTools.h" +#include "cmRegularExpression.h" #include "cmake.h" #include "cmListFileCache.h" #include "cmMakefileGenerator.h" @@ -24,13 +25,14 @@ #endif // this is a test driver program for cmake. -int main (int argc, char *argv[]) +int main (int argc, char **argv) { if (argc < 4) { std::cerr << "Usage: " << argv[0] << " test-src-dir test-bin-dir test-executable\n"; return 1; } + // does the directory exist ? if (!cmSystemTools::FileIsDirectory(argv[2])) { @@ -140,7 +142,11 @@ int main (int argc, char *argv[]) makeCommand = cmSystemTools::ConvertToOutputPath(makeCommand.c_str()); std::string lowerCaseCommand = makeCommand; cmSystemTools::LowerCase(lowerCaseCommand); - + std::string dartMakeCommand = DART_MAKECOMMAND; + std::string buildtype = "Debug"; +#ifdef CMAKE_INTDIR + buildtype = CMAKE_INTDIR; +#endif // if msdev is the make program then do the following // MSDEV 6.0 if(lowerCaseCommand.find("msdev") != std::string::npos) @@ -162,7 +168,8 @@ int main (int argc, char *argv[]) #endif makeCommand += " "; makeCommand += projectName; - makeCommand += ".dsw /MAKE \"ALL_BUILD - Debug\" /REBUILD"; + makeCommand += ".dsw /MAKE \"ALL_BUILD - "; + makeCommand += buildtype + "\" /REBUILD"; } // MSDEV 7.0 .NET else if (lowerCaseCommand.find("devenv") != std::string::npos) @@ -181,7 +188,8 @@ int main (int argc, char *argv[]) #endif makeCommand += " "; makeCommand += projectName; - makeCommand += ".sln /rebuild Debug /project ALL_BUILD"; + makeCommand += ".sln /rebuild "; + makeCommand += buildtype + " /project ALL_BUILD"; } // command line make program else @@ -228,7 +236,7 @@ int main (int argc, char *argv[]) fullPath = cmSystemTools::CollapseFullPath(tryPath.c_str()); } // try the Debug extension - tryPath = "Debug/"; + tryPath = buildtype + "/"; tryPath += cmSystemTools::GetFilenameName(executableName); if(cmSystemTools::FileExists(tryPath.c_str())) { @@ -248,7 +256,8 @@ int main (int argc, char *argv[]) fullPath = cmSystemTools::CollapseFullPath(tryPath.c_str()); } tryPath = executableDirectory; - tryPath += "/Debug/"; + tryPath += "/"; + tryPath += buildtype + "/"; tryPath += executableName; tryPath += cmSystemTools::GetExecutableExtension(); if(cmSystemTools::FileExists(tryPath.c_str())) |