diff options
author | Brad King <brad.king@kitware.com> | 2006-02-14 20:35:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-02-14 20:35:34 (GMT) |
commit | bd0b829ffb6bf540fb9d3938687705deea0532e2 (patch) | |
tree | dd3e19affb1bb9487c61d8e77a47cc31f6a96818 /Source/cmGlobalVisualStudio71Generator.cxx | |
parent | eeab2c55ed0615032ae9935fc2e805feee689031 (diff) | |
download | CMake-bd0b829ffb6bf540fb9d3938687705deea0532e2.zip CMake-bd0b829ffb6bf540fb9d3938687705deea0532e2.tar.gz CMake-bd0b829ffb6bf540fb9d3938687705deea0532e2.tar.bz2 |
BUG: Fixed generation of VS8 solution file to not be re-written when loaded by VS and to work with msbuild.
Diffstat (limited to 'Source/cmGlobalVisualStudio71Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio71Generator.cxx | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index a5e14aa..ef9487d 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -25,6 +25,7 @@ cmGlobalVisualStudio71Generator::cmGlobalVisualStudio71Generator() { m_FindMakeProgramFile = "CMakeVS71FindMake.cmake"; + m_ProjectConfigurationSectionName = "ProjectConfiguration"; } @@ -52,6 +53,7 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout, std::string rootdir = root->GetMakefile()->GetStartOutputDirectory(); rootdir += "/"; bool doneAllBuild = false; + bool doneCheckBuild = false; bool doneRunTests = false; bool doneInstall = false; @@ -141,6 +143,17 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout, doneAllBuild = true; } } + if(l->first == CMAKE_CHECK_BUILD_SYSTEM_TARGET) + { + if(doneCheckBuild) + { + skip = true; + } + else + { + doneCheckBuild = true; + } + } if(l->first == "INSTALL") { if(doneInstall) @@ -172,16 +185,10 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout, } } } - fout << "Global\n" - << "\tGlobalSection(SolutionConfiguration) = preSolution\n"; - - for(std::vector<std::string>::iterator i = m_Configurations.begin(); - i != m_Configurations.end(); ++i) - { - fout << "\t\t" << *i << " = " << *i << "\n"; - } - fout << "\tEndGlobalSection\n"; - fout << "\tGlobalSection(ProjectConfiguration) = postSolution\n"; + fout << "Global\n"; + this->WriteSolutionConfigurations(fout); + fout << "\tGlobalSection(" << m_ProjectConfigurationSectionName + << ") = postSolution\n"; // loop over again and compute the depends for(i = 0; i < generators.size(); ++i) { @@ -221,6 +228,19 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout, } +void +cmGlobalVisualStudio71Generator +::WriteSolutionConfigurations(std::ostream& fout) +{ + fout << "\tGlobalSection(SolutionConfiguration) = preSolution\n"; + for(std::vector<std::string>::iterator i = m_Configurations.begin(); + i != m_Configurations.end(); ++i) + { + fout << "\t\t" << *i << " = " << *i << "\n"; + } + fout << "\tEndGlobalSection\n"; +} + // Write a dsp file into the SLN file, // Note, that dependencies from executables to // the libraries it uses are also done here |