summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-05-07 22:11:16 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-05-07 22:11:16 (GMT)
commit885e37da224353e242e7135b0fc8e6f2445a54c7 (patch)
tree17effe2cbc6b46afcd670ffe45f0fcbb8c7d01b6 /Source/cmMakefile.cxx
parent5066defc2378172be5bcfc22238d9cb68f05bb29 (diff)
downloadCMake-885e37da224353e242e7135b0fc8e6f2445a54c7.zip
CMake-885e37da224353e242e7135b0fc8e6f2445a54c7.tar.gz
CMake-885e37da224353e242e7135b0fc8e6f2445a54c7.tar.bz2
ENH: call configure from cmake
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx62
1 files changed, 1 insertions, 61 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d8dfe2f..c5d566e 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -75,7 +75,7 @@ void cmMakefile::AddDefaultCommands()
{
this->AddCommand(*i);
}
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
this->AddDefinition("WIN32", "1");
#else
this->AddDefinition("UNIX", "1");
@@ -729,66 +729,6 @@ cmMakefile::FindSubDirectoryCMakeListsFiles(std::vector<cmMakefile*>&
}
}
-
-void cmMakefile::GenerateCacheOnly()
-{
- std::vector<cmMakefile*> makefiles;
- this->FindSubDirectoryCMakeListsFiles(makefiles);
- for(std::vector<cmMakefile*>::iterator i = makefiles.begin();
- i != makefiles.end(); ++i)
- {
- cmMakefile* mf = *i;
- std::string source = mf->GetHomeDirectory();
- source += "/CMake/CMakeMakefileTemplate.in";
- cmSystemTools::MakeDirectory(mf->GetStartOutputDirectory());
- std::string dest = mf->GetStartOutputDirectory();
- dest += "/Makefile";
- std::ofstream fout(dest.c_str());
- std::cout << "cmake: creating : " << dest.c_str() << "\n";
- if(!fout)
- {
- cmSystemTools::Error("Failed to open file for write " , dest.c_str());
- }
- else
- {
- if(strcmp(mf->GetHomeDirectory(),
- mf->GetHomeOutputDirectory()) == 0)
- {
- fout << "srcdir = .\n\n";
- }
- else
- {
- fout << "srcdir = " << mf->GetStartDirectory() << "\n";
- fout << "VPATH = " << mf->GetStartDirectory() << "\n";
- }
- }
- fout << "include "
- << mf->GetHomeOutputDirectory() << "/CMake/CMakeMaster.make\n";
- dest = mf->GetStartOutputDirectory();
- dest += "/CMakeTargets.make";
- // make sure there is a CMakeTargets.make file as some
- // makes require it to exist
- if(!cmSystemTools::FileExists(dest.c_str()))
- {
- std::cout << "cmake: creating : " << dest.c_str() << "\n";
- std::ofstream fout(dest.c_str());
- if(!fout)
- {
- cmSystemTools::Error("Failed to open file for write " , dest.c_str());
- }
- fout << "#Initial CMakeTargets.make file created only to keep \n";
- fout << "#certain makes happy that don't like to include makefiles\n";
- fout << "#that do not exist\n";
- }
- }
-
- // CLEAN up the makefiles created
- for(unsigned int i =0; i < makefiles.size(); ++i)
- {
- delete makefiles[i];
- }
-}
-
/**
* Add the default definitions to the makefile. These values must not