diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-02-24 14:43:23 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-02-24 14:43:23 (GMT) |
commit | 0ba40b59c7dc4c00c11902bae20fb9f03bde4168 (patch) | |
tree | f4f9b380ff83aae36438d5dd6d0c6d73706b3fd3 /Source | |
parent | 1ecd48ba67b2e0d02227f848468f9398ec183be2 (diff) | |
download | CMake-0ba40b59c7dc4c00c11902bae20fb9f03bde4168.zip CMake-0ba40b59c7dc4c00c11902bae20fb9f03bde4168.tar.gz CMake-0ba40b59c7dc4c00c11902bae20fb9f03bde4168.tar.bz2 |
COMP: Handle preinstall properly on IDEs
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 5 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.h | 1 | ||||
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.h | 1 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio71Generator.cxx | 12 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 18 |
5 files changed, 6 insertions, 31 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 52f3480..8f1bbe2 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1289,7 +1289,10 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) cpackCommandLines.erase(cpackCommandLines.begin(), cpackCommandLines.end()); singleLine.erase(singleLine.begin(), singleLine.end()); depends.erase(depends.begin(), depends.end()); - depends.push_back("preinstall"); + if ( this->GetPreInstallAvailable() ) + { + depends.push_back("preinstall"); + } if(mf->GetDefinition("CMake_BINARY_DIR")) { // We are building CMake itself. We cannot use the original diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index df7b6ab..92b618c 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -174,6 +174,7 @@ protected: virtual const char* GetPackageTargetName() { return "PACKAGE"; } virtual const char* GetEditCacheTargetName() { return "EDIT_CACHE"; } virtual const char* GetRebuildCacheTargetName() { return "REBUILD_CACHE"; } + virtual bool GetPreInstallAvailable() { return false; } bool m_ForceUnixPaths; cmStdString m_FindMakeProgramFile; diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index e9e579b..fd232d2 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -126,6 +126,7 @@ protected: virtual const char* GetPackageTargetName() { return "package"; } virtual const char* GetEditCacheTargetName() { return "edit_cache"; } virtual const char* GetRebuildCacheTargetName() { return "rebuild_cache"; } + virtual bool GetPreInstallAvailable() { return true; } // Some make programs (Borland) do not keep a rule if there are no diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index 13d08a0..ad31d5a 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -59,7 +59,6 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout, bool doneEditCache = false; bool doneRebuildCache = false; bool donePackage = false; - bool donePreInstall = false; // For each cmMakefile, create a VCProj for it, and // add it to this SLN file @@ -169,17 +168,6 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout, doneInstall = true; } } - if(l->first == "preinstall") - { - if(donePreInstall) - { - skip = true; - } - else - { - donePreInstall = true; - } - } if(l->first == "RUN_TESTS") { if(doneRunTests) diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 22fb9d2..9fcedac 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -210,11 +210,6 @@ void cmGlobalVisualStudio7Generator::Generate() no_working_dir, cmake_command.c_str(), "-DBUILD_TYPE=$(OutDir)", "-P", "cmake_install.cmake"); - gen[0]->GetMakefile()-> - AddUtilityCommand("preinstall", false, no_output, no_depends, - no_working_dir, - cmake_command.c_str(), - "-E", "echo", "preinstall"); // Make the INSTALL target depend on ALL_BUILD unless the // project says to not do so. @@ -288,7 +283,6 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout, bool doneEditCache = false; bool doneRebuildCache = false; bool donePackage = false; - bool donePreInstall = false; // For each cmMakefile, create a VCProj for it, and // add it to this SLN file @@ -387,17 +381,6 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout, doneInstall = true; } } - if(l->first == "preinstall") - { - if(donePreInstall) - { - skip = true; - } - else - { - donePreInstall = true; - } - } if(l->first == "RUN_TESTS") { if(doneRunTests) @@ -760,7 +743,6 @@ void cmGlobalVisualStudio7Generator::Configure() cmGlobalGenerator::Configure(); this->CreateGUID("ALL_BUILD"); this->CreateGUID("INSTALL"); - this->CreateGUID("preinstall"); this->CreateGUID("RUN_TESTS"); this->CreateGUID("EDIT_CACHE"); this->CreateGUID("REBUILD_CACHE"); |