summaryrefslogtreecommitdiffstats
path: root/Source/CMakeSetupCMD.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-01-05 16:41:20 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-01-05 16:41:20 (GMT)
commitc54a05bfc799f3e88459956ec37698bab22c27f9 (patch)
tree400b2eb0b6853952a4faa8c0fc41b90eb06deaec /Source/CMakeSetupCMD.cxx
parentd888b5e39d4e01af538b48ad16c2a6a474de34a0 (diff)
downloadCMake-c54a05bfc799f3e88459956ec37698bab22c27f9.zip
CMake-c54a05bfc799f3e88459956ec37698bab22c27f9.tar.gz
CMake-c54a05bfc799f3e88459956ec37698bab22c27f9.tar.bz2
ENH: rework cmake, added ruleMaker classes and changed the syntax of the CMakeLists.txt files.
Diffstat (limited to 'Source/CMakeSetupCMD.cxx')
-rw-r--r--Source/CMakeSetupCMD.cxx27
1 files changed, 14 insertions, 13 deletions
diff --git a/Source/CMakeSetupCMD.cxx b/Source/CMakeSetupCMD.cxx
index 8e64324..8fecfad 100644
--- a/Source/CMakeSetupCMD.cxx
+++ b/Source/CMakeSetupCMD.cxx
@@ -1,6 +1,7 @@
-#include "cmDSWMakefile.h"
-#include "cmDSPMakefile.h"
-#include <iostream>
+#include "cmStandardIncludes.h"
+#include "cmMakefile.h"
+#include "cmMSProjectGenerator.h"
+
// this is the command line version of CMakeSetup.
// It is called from Visual Studio when a CMakeLists.txt
@@ -21,7 +22,6 @@ void SetArgs(cmMakefile& builder, int ac, char** av)
if(arg.find("-D",0) != std::string::npos)
{
std::string path = arg.substr(2);
- std::cerr << "set makefile dir " << path.c_str() << std::endl;
builder.SetCurrentDirectory(path.c_str());
}
if(arg.find("-O",0) != std::string::npos)
@@ -44,24 +44,25 @@ main(int ac, char** av)
if(ac < 3)
{
std::cerr << "Usage: " << av[0] <<
- " Makefile.in -[DSP|DSW] -Hinsighthome -Dcurrentdir -Ooutput directory" << std::endl;
+ " CMakeLists.txt -[DSP|DSW] -Hinsighthome -Dcurrentdir"
+ " -Ooutput directory" << std::endl;
return -1;
}
std::string arg = av[2];
+ cmMakefile builder;
+ SetArgs(builder, ac, av);
+ cmMSProjectGenerator* pg = new cmMSProjectGenerator;
if(arg.find("-DSP", 0) != std::string::npos)
{
- cmDSPMakefile builder;
- SetArgs(builder, ac, av);
- builder.ReadMakefile(av[1]);
- builder.OutputDSPFile();
+ pg->SetBuildDSP();
}
else
{
- cmDSWMakefile builder;
- SetArgs(builder, ac, av);
- builder.ReadMakefile(av[1]);
- builder.OutputDSWFile();
+ pg->SetBuildDSW();
}
+ builder.SetMakefileGenerator(pg);
+ builder.ReadMakefile(av[1]);
+ builder.GenerateMakefile();
return 0;
}