CREATE_PROJECT: Fix VS2008 property names
This commit is contained in:
parent
680da50b81
commit
95d191e19a
3 changed files with 13 additions and 15 deletions
|
@ -102,7 +102,7 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
|
|||
"\t\t<VCTargetsPath Condition=\"'$(VCTargetsPath" << _version << ")' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath" << _version << ")</VCTargetsPath>\n";
|
||||
|
||||
for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
|
||||
project << "\t\t<VcpkgTriplet Condition=\"'$(Platform)' == '" << getMSVCConfigName(*arch) << "'\">" << getMSVCArchName(*arch) << "-windows</VcpkgTriplet>";
|
||||
project << "\t\t<VcpkgTriplet Condition=\"'$(Platform)' == '" << getMSVCConfigName(*arch) << "'\">" << getMSVCArchName(*arch) << "-windows</VcpkgTriplet>\n";
|
||||
}
|
||||
|
||||
project << "\t</PropertyGroup>\n";
|
||||
|
@ -399,8 +399,6 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea
|
|||
}
|
||||
|
||||
void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, MSVC_Architecture arch, const std::string &configuration) {
|
||||
const std::string outputBitness = (arch == ARCH_X86 ? "32" : "64");
|
||||
|
||||
std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCArchName(arch) + getPropertiesExtension()).c_str());
|
||||
if (!properties || !properties.is_open()) {
|
||||
error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCArchName(arch) + getPropertiesExtension() + "\" for writing");
|
||||
|
@ -455,6 +453,7 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, M
|
|||
|
||||
if (configuration == "LLVM") {
|
||||
// FIXME The LLVM cl wrapper does not seem to work properly with the $(TargetDir) path so we hard-code the build folder until the issue is resolved
|
||||
const std::string outputBitness = (arch == ARCH_X86 ? "32" : "64");
|
||||
properties << "\t\t\t<AdditionalIncludeDirectories>" << configuration << outputBitness <<";%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n"
|
||||
"\t\t\t<AdditionalOptions>-Wno-microsoft -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder -Wpointer-arith -Wcast-qual -Wshadow -Wnon-virtual-dtor -Wwrite-strings -Wno-conversion -Wno-shorten-64-to-32 -Wno-sign-compare -Wno-four-char-constants -Wno-nested-anon-types -Qunused-arguments %(AdditionalOptions)</AdditionalOptions>\n";
|
||||
}
|
||||
|
|
|
@ -109,11 +109,10 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
|
|||
toolConfig += (enableLanguageExtensions ? "DisableLanguageExtensions=\"false\" " : "");
|
||||
|
||||
for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
|
||||
const std::string outputBitness = (*arch == ARCH_X86 ? "" : "64");
|
||||
outputConfiguration(setup, project, toolConfig, "Debug", getMSVCConfigName(*arch), outputBitness);
|
||||
outputConfiguration(setup, project, toolConfig, "Analysis", getMSVCConfigName(*arch), outputBitness);
|
||||
outputConfiguration(setup, project, toolConfig, "LLVM", getMSVCConfigName(*arch), outputBitness);
|
||||
outputConfiguration(setup, project, toolConfig, "Release", getMSVCConfigName(*arch), outputBitness);
|
||||
outputConfiguration(setup, project, toolConfig, "Debug", *arch);
|
||||
outputConfiguration(setup, project, toolConfig, "Analysis", *arch);
|
||||
outputConfiguration(setup, project, toolConfig, "LLVM", *arch);
|
||||
outputConfiguration(setup, project, toolConfig, "Release", *arch);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,8 +150,8 @@ void VisualStudioProvider::outputConfiguration(std::ostream &project, const Buil
|
|||
project << "\t\t</Configuration>\n";
|
||||
}
|
||||
|
||||
void VisualStudioProvider::outputConfiguration(const BuildSetup &setup, std::ostream &project, const std::string &toolConfig, const std::string &config, const std::string &platform, const std::string &props) {
|
||||
project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\" << setup.projectDescription << "_" << config << props << ".vsprops\">\n"
|
||||
void VisualStudioProvider::outputConfiguration(const BuildSetup &setup, std::ostream &project, const std::string &toolConfig, const std::string &config, const MSVC_Architecture arch) {
|
||||
project << "\t\t<Configuration Name=\"" << config << "|" << getMSVCConfigName(arch) << "\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\" << setup.projectDescription << "_" << config << getMSVCArchName(arch) << ".vsprops\">\n"
|
||||
"\t\t\t<Tool Name=\"VCCLCompilerTool\" "<< toolConfig << "/>\n"
|
||||
"\t\t</Configuration>\n";
|
||||
}
|
||||
|
@ -260,9 +259,9 @@ void VisualStudioProvider::outputGlobalPropFile(const BuildSetup &setup, std::of
|
|||
|
||||
void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelease, MSVC_Architecture arch, const std::string &configuration) {
|
||||
|
||||
std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCConfigName(arch) + getPropertiesExtension()).c_str());
|
||||
std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCArchName(arch) + getPropertiesExtension()).c_str());
|
||||
if (!properties || !properties.is_open()) {
|
||||
error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCConfigName(arch) + getPropertiesExtension() + "\" for writing");
|
||||
error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCArchName(arch) + getPropertiesExtension() + "\" for writing");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -270,8 +269,8 @@ void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelea
|
|||
"<VisualStudioPropertySheet\n"
|
||||
"\tProjectType=\"Visual C++\"\n"
|
||||
"\tVersion=\"8.00\"\n"
|
||||
"\tName=\"" << setup.projectDescription << "_" << configuration << getMSVCConfigName(arch) << "\"\n"
|
||||
"\tInheritedPropertySheets=\".\\" << setup.projectDescription << "_Global" << getMSVCConfigName(arch) << ".vsprops\"\n"
|
||||
"\tName=\"" << setup.projectDescription << "_" << configuration << getMSVCArchName(arch) << "\"\n"
|
||||
"\tInheritedPropertySheets=\".\\" << setup.projectDescription << "_Global" << getMSVCArchName(arch) << ".vsprops\"\n"
|
||||
"\t>\n"
|
||||
"\t<Tool\n"
|
||||
"\t\tName=\"VCCLCompilerTool\"\n";
|
||||
|
|
|
@ -51,7 +51,7 @@ protected:
|
|||
const char *getPropertiesExtension();
|
||||
|
||||
void outputConfiguration(std::ostream &project, const BuildSetup &setup, const std::string &libraries, const std::string &config, const MSVC_Architecture arch);
|
||||
void outputConfiguration(const BuildSetup &setup, std::ostream &project, const std::string &toolConfig, const std::string &config, const std::string &platform, const std::string &props);
|
||||
void outputConfiguration(const BuildSetup &setup, std::ostream &project, const std::string &toolConfig, const std::string &config, const MSVC_Architecture arch);
|
||||
void outputBuildEvents(std::ostream &project, const BuildSetup &setup, const MSVC_Architecture arch);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue