summaryrefslogtreecommitdiffstats
path: root/Source/CMakeBuildTargets.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-02-19 20:13:48 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-02-19 20:13:48 (GMT)
commit89e037ee19ed033fee0830a0c56c7ae956265512 (patch)
tree7a98427243bde8b3e73210dee288784981b46f9c /Source/CMakeBuildTargets.cxx
parenta4bbb55efdbb8d1b948b55248b54a3532f2f9d41 (diff)
downloadCMake-89e037ee19ed033fee0830a0c56c7ae956265512.zip
CMake-89e037ee19ed033fee0830a0c56c7ae956265512.tar.gz
CMake-89e037ee19ed033fee0830a0c56c7ae956265512.tar.bz2
ENH: first pass at cache, clean up the unix generator, clean up configure.in some
Diffstat (limited to 'Source/CMakeBuildTargets.cxx')
-rw-r--r--Source/CMakeBuildTargets.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/Source/CMakeBuildTargets.cxx b/Source/CMakeBuildTargets.cxx
index 876708e..243cac0 100644
--- a/Source/CMakeBuildTargets.cxx
+++ b/Source/CMakeBuildTargets.cxx
@@ -17,14 +17,27 @@
#include "cmStandardIncludes.h"
#include "cmMakeDepend.h"
#include "cmUnixMakefileGenerator.h"
+#include "cmCacheManager.h"
+void Usage(const char* program)
+{
+ std::cerr << "Usage: " << program << " CMakeLists.txt "
+ << "-Ssource_start_directory "
+ << "-Ooutput_start_directory "
+ << "-Hsource_home_directory "
+ << "-Boutput_home_directory\n"
+ << "Where start directories are the current place in the tree,"
+ "and the home directories are the top.\n";
+}
+
+
// This is the main program used to gentrate makefile fragments
// from CMakeLists.txt input files.
int main(int ac, char** av)
{
if(ac < 2)
{
- std::cerr << "Usage: " << av[0] << " Makefile.in -Ipath ..." << std::endl;
+ Usage(av[0]);
return -1;
}
// Create a makefile
@@ -66,10 +79,12 @@ int main(int ac, char** av)
// Read and parse the input makefile
mf.MakeStartDirectoriesCurrent();
+ cmCacheManager::GetInstance()->LoadCache(&mf);
if(!mf.ReadListFile(av[1]))
{
- std::cerr << "Usage: " << av[0] << " Makefile.in -Ipath ..." << std::endl;
+ Usage(av[0]);
return -1;
}
mf.GenerateMakefile();
+ cmCacheManager::GetInstance()->SaveCache(&mf);
}