summaryrefslogtreecommitdiffstats
path: root/Source/CMakeBuildTargets.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/CMakeBuildTargets.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/CMakeBuildTargets.cxx')
-rw-r--r--Source/CMakeBuildTargets.cxx21
1 files changed, 8 insertions, 13 deletions
diff --git a/Source/CMakeBuildTargets.cxx b/Source/CMakeBuildTargets.cxx
index d29ce74..c87ecb7 100644
--- a/Source/CMakeBuildTargets.cxx
+++ b/Source/CMakeBuildTargets.cxx
@@ -1,7 +1,7 @@
-#include "cmUnixMakefile.h"
+#include "cmMakefile.h"
+#include "cmStandardIncludes.h"
#include "cmMakeDepend.h"
-#include <iostream>
-
+#include "cmUnixMakefileGenerator.h"
// This is the main program used to gentrate makefile fragments
// from CMakeLists.txt input files.
@@ -12,10 +12,9 @@ main(int ac, char** av)
std::cerr << "Usage: " << av[0] << " Makefile.in -Ipath ..." << std::endl;
return -1;
}
- // Create a unix makefile
- cmUnixMakefile mf;
- // Create a depends object
- cmMakeDepend md;
+ // Create a makefile
+ cmMakefile mf;
+ mf.AddDefinition("UNIX", "1");
// Parse the command line
if(ac > 2)
{
@@ -42,16 +41,12 @@ main(int ac, char** av)
}
}
}
+ mf.SetMakefileGenerator(new cmUnixMakefileGenerator);
// Read and parse the input makefile
if(!mf.ReadMakefile(av[1]))
{
std::cerr << "Usage: " << av[0] << " Makefile.in -Ipath ..." << std::endl;
return -1;
}
- // Set the makefile object on the depend object
- md.SetMakefile(&mf);
- // compute the depend information
- md.DoDepends();
- // Ouput the result
- mf.OutputMakefile("CMakeTargets.make");
+ mf.GenerateMakefile();
}