diff options
Diffstat (limited to 'Source/CMakeBuildTargets.cxx')
-rw-r--r-- | Source/CMakeBuildTargets.cxx | 19 |
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); } |