diff options
Diffstat (limited to 'Source/cmGlobalVisualStudio8Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.cxx | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 1c62fbd..1df76ca 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -142,6 +142,9 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget() // Add a custom rule to re-run CMake if any input files changed. { + // The custom rule runs cmake so set UTF-8 pipes. + bool stdPipesUTF8 = true; + // Collect the input files used to generate all targets in this // project. std::vector<std::string> listFiles; @@ -160,7 +163,7 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget() lg.AddCustomCommandToTarget( CMAKE_CHECK_BUILD_SYSTEM_TARGET, byproducts, no_depends, verifyCommandLines, cmCustomCommandType::PRE_BUILD, - "Checking File Globs", no_working_directory, false); + "Checking File Globs", no_working_directory, stdPipesUTF8); // Ensure ZERO_CHECK always runs in Visual Studio using MSBuild, // otherwise the prebuild command will not be run. @@ -192,7 +195,8 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget() if (cmSourceFile* file = lg.AddCustomCommandToOutput( stamps, no_byproducts, listFiles, no_main_dependency, no_implicit_depends, commandLines, "Checking Build System", - no_working_directory, true, false)) { + no_working_directory, true, false, false, false, "", "", + stdPipesUTF8)) { gt->AddSource(file->ResolveFullPath()); } else { cmSystemTools::Error("Error adding rule for " + stamps[0]); @@ -275,23 +279,31 @@ void cmGlobalVisualStudio8Generator::WriteProjectConfigurations( bool cmGlobalVisualStudio8Generator::NeedsDeploy( cmGeneratorTarget const& target, const char* config) const { - cmStateEnums::TargetType type = target.GetType(); - bool noDeploy = DeployInhibited(target, config); - return !noDeploy && - (type == cmStateEnums::EXECUTABLE || - type == cmStateEnums::SHARED_LIBRARY) && - this->TargetSystemSupportsDeployment(); -} + cmStateEnums::TargetType const type = target.GetType(); + if (type != cmStateEnums::EXECUTABLE && + type != cmStateEnums::SHARED_LIBRARY) { + // deployment only valid on executables and shared libraries. + return false; + } -bool cmGlobalVisualStudio8Generator::DeployInhibited( - cmGeneratorTarget const& target, const char* config) const -{ - bool rVal = false; - if (const char* prop = target.GetProperty("VS_NO_SOLUTION_DEPLOY")) { - rVal = cmIsOn( + if (const char* prop = target.GetProperty("VS_SOLUTION_DEPLOY")) { + // If set, it dictates behavior + return cmIsOn( cmGeneratorExpression::Evaluate(prop, target.LocalGenerator, config)); } - return rVal; + + // To be deprecated, disable deployment even if target supports it. + if (const char* prop = target.GetProperty("VS_NO_SOLUTION_DEPLOY")) { + if (cmIsOn(cmGeneratorExpression::Evaluate(prop, target.LocalGenerator, + config))) { + // If true, always disable deployment + return false; + } + } + + // Legacy behavior, enabled deployment based on 'hard-coded' target + // platforms. + return this->TargetSystemSupportsDeployment(); } bool cmGlobalVisualStudio8Generator::TargetSystemSupportsDeployment() const |