summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.cxx27
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.h2
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx21
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.h2
-rw-r--r--Source/CPack/IFW/cmCPackIFWPackage.cxx60
-rw-r--r--Source/CPack/IFW/cmCPackIFWPackage.h6
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx4
-rw-r--r--Source/CTest/cmCTestUpdateCommand.cxx2
-rw-r--r--Source/CTest/cmCTestUpdateHandler.cxx5
-rw-r--r--Source/CTest/cmCTestUploadHandler.cxx5
-rw-r--r--Source/CTest/cmCTestVC.cxx15
-rw-r--r--Source/CTest/cmParseMumpsCoverage.cxx8
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx3
-rw-r--r--Source/cmCTest.cxx14
-rw-r--r--Source/cmListFileLexer.c75
-rw-r--r--Source/cmListFileLexer.in.l7
-rw-r--r--Source/cmMakefileTargetGenerator.cxx10
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx71
19 files changed, 264 insertions, 75 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index b9c3034..077005a 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 0)
-set(CMake_VERSION_PATCH 20140813)
+set(CMake_VERSION_PATCH 20140822)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
index e7c97c6..732938b 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
@@ -33,8 +33,6 @@
//----------------------------------------------------------------------------
cmCPackIFWGenerator::cmCPackIFWGenerator()
{
- // Change the default behavior
- componentPackageMethod = ONE_PACKAGE_PER_COMPONENT;
}
//----------------------------------------------------------------------------
@@ -374,9 +372,6 @@ cmCPackComponentGroup*
cmCPackIFWGenerator::GetComponentGroup(const std::string &projectName,
const std::string &groupName)
{
- ComponentGoupsMap::iterator git = ComponentGroups.find(groupName);
- if ( git != ComponentGroups.end() ) return &(git->second);
-
cmCPackComponentGroup* group
= cmCPackGenerator::GetComponentGroup(projectName, groupName);
if(!group) return group;
@@ -388,7 +383,7 @@ cmCPackIFWGenerator::GetComponentGroup(const std::string &projectName,
cmCPackIFWPackage *package = &Packages[name];
package->Name = name;
package->Generator = this;
- if(package->ConfigureFromComponentGroup(group))
+ if(package->ConfigureFromGroup(group))
{
package->Installer = &Installer;
Installer.Packages.insert(
@@ -436,17 +431,29 @@ bool cmCPackIFWGenerator::IsOnePackage() const
}
//----------------------------------------------------------------------------
-std::string cmCPackIFWGenerator::GetRootPackageName() const
+std::string cmCPackIFWGenerator::GetRootPackageName()
{
+ // Default value
std::string name = "root";
- if(const char* optIFW_ROOT_PACKAGE_NAME =
- this->GetOption("CPACK_IFW_ROOT_PACKAGE_NAME"))
+ if (const char* optIFW_PACKAGE_GROUP =
+ this->GetOption("CPACK_IFW_PACKAGE_GROUP"))
+ {
+ // Configure from root group
+ cmCPackIFWPackage package;
+ package.Generator = this;
+ package.ConfigureFromGroup(optIFW_PACKAGE_GROUP);
+ name = package.Name;
+ }
+ else if (const char* optIFW_PACKAGE_NAME =
+ this->GetOption("CPACK_IFW_PACKAGE_NAME"))
{
- name = optIFW_ROOT_PACKAGE_NAME;
+ // Configure from root package name
+ name = optIFW_PACKAGE_NAME;
}
else if (const char* optPACKAGE_NAME =
this->GetOption("CPACK_PACKAGE_NAME"))
{
+ // Configure from package name
name = optPACKAGE_NAME;
}
return name;
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h
index e871f7c..7211e04 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.h
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.h
@@ -97,7 +97,7 @@ protected: // Methods
bool IsOnePackage() const;
- std::string GetRootPackageName() const;
+ std::string GetRootPackageName();
std::string GetGroupPackageName(cmCPackComponentGroup *group) const;
std::string GetComponentPackageName(cmCPackComponent *component) const;
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index 78b2ffb..fcb07e6 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -48,9 +48,15 @@ const char *cmCPackIFWInstaller::GetOption(const std::string &op) const
void cmCPackIFWInstaller::ConfigureFromOptions()
{
// Name;
- if (const char* option = GetOption("CPACK_PACKAGE_NAME"))
+ if (const char* optIFW_PACKAGE_NAME =
+ this->GetOption("CPACK_IFW_PACKAGE_NAME"))
{
- Name = option;
+ Name = optIFW_PACKAGE_NAME;
+ }
+ else if (const char* optPACKAGE_NAME =
+ this->GetOption("CPACK_PACKAGE_NAME"))
+ {
+ Name = optPACKAGE_NAME;
}
else
{
@@ -274,7 +280,16 @@ void cmCPackIFWInstaller::GeneratePackageFiles()
cmCPackIFWPackage package;
package.Generator = Generator;
package.Installer = this;
- package.ConfigureFromOptions();
+ // Check package group
+ if (const char* option = GetOption("CPACK_IFW_PACKAGE_GROUP"))
+ {
+ package.ConfigureFromGroup(option);
+ package.ForcedInstallation = "true";
+ }
+ else
+ {
+ package.ConfigureFromOptions();
+ }
package.GeneratePackageFile();
return;
}
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.h b/Source/CPack/IFW/cmCPackIFWInstaller.h
index 02cd07b..1630a94 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.h
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.h
@@ -13,7 +13,7 @@
#ifndef cmCPackIFWInstaller_h
#define cmCPackIFWInstaller_h
-#include "cmStandardIncludes.h"
+#include <cmStandardIncludes.h>
class cmCPackIFWPackage;
class cmCPackIFWGenerator;
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx
index 5e7a7c7..3c45639 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.cxx
+++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx
@@ -121,7 +121,14 @@ cmCPackIFWPackage::cmCPackIFWPackage() :
//----------------------------------------------------------------------------
const char *cmCPackIFWPackage::GetOption(const std::string &op) const
{
- return Generator ? Generator->GetOption(op) : 0;
+ const char *option = Generator ? Generator->GetOption(op) : 0;
+ return option && *option ? option : 0;
+}
+
+//----------------------------------------------------------------------------
+bool cmCPackIFWPackage::IsOn(const std::string &op) const
+{
+ return Generator ? Generator->IsOn(op) : false;
}
//----------------------------------------------------------------------------
@@ -232,7 +239,6 @@ int cmCPackIFWPackage::ConfigureFromComponent(cmCPackComponent *component)
// Script
if (const char* option = GetOption(prefix + "SCRIPT"))
{
- // TODO: add check file exist
Script = option;
}
@@ -306,7 +312,7 @@ int cmCPackIFWPackage::ConfigureFromComponent(cmCPackComponent *component)
//----------------------------------------------------------------------------
int
-cmCPackIFWPackage::ConfigureFromComponentGroup(cmCPackComponentGroup *group)
+cmCPackIFWPackage::ConfigureFromGroup(cmCPackComponentGroup *group)
{
if(!group) return 0;
@@ -335,6 +341,12 @@ cmCPackIFWPackage::ConfigureFromComponentGroup(cmCPackComponentGroup *group)
Version = "1.0.0";
}
+ // Script
+ if (const char* option = GetOption(prefix + "SCRIPT"))
+ {
+ Script = option;
+ }
+
// Licenses
if (const char* option = this->GetOption(prefix + "LICENSES"))
{
@@ -359,6 +371,48 @@ cmCPackIFWPackage::ConfigureFromComponentGroup(cmCPackComponentGroup *group)
}
//----------------------------------------------------------------------------
+int cmCPackIFWPackage::ConfigureFromGroup(const std::string &groupName)
+{
+ // Group configuration
+
+ cmCPackComponentGroup group;
+ std::string prefix = "CPACK_COMPONENT_GROUP_"
+ + cmsys::SystemTools::UpperCase(groupName)
+ + "_";
+
+ if (const char *option = GetOption(prefix + "DISPLAY_NAME"))
+ {
+ group.DisplayName = option;
+ }
+ else
+ {
+ group.DisplayName = group.Name;
+ }
+
+ if (const char* option = GetOption(prefix + "DESCRIPTION"))
+ {
+ group.Description = option;
+ }
+ group.IsBold = IsOn(prefix + "BOLD_TITLE");
+ group.IsExpandedByDefault = IsOn(prefix + "EXPANDED");
+
+ // Package configuration
+
+ group.Name = groupName;
+
+ if(Generator)
+ {
+ Name = Generator->GetGroupPackageName(&group);
+ }
+ else
+ {
+ Name = group.Name;
+ }
+
+ return ConfigureFromGroup(&group);
+}
+
+//----------------------------------------------------------------------------
void cmCPackIFWPackage::GeneratePackageFile()
{
// Lazy directory initialization
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.h b/Source/CPack/IFW/cmCPackIFWPackage.h
index 868c15d..9fc9bd0 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.h
+++ b/Source/CPack/IFW/cmCPackIFWPackage.h
@@ -13,7 +13,7 @@
#ifndef cmCPackIFWPackage_h
#define cmCPackIFWPackage_h
-#include "cmStandardIncludes.h"
+#include <cmStandardIncludes.h>
class cmCPackComponent;
class cmCPackComponentGroup;
@@ -105,6 +105,7 @@ public: // Configuration
public: // Internal implementation
const char* GetOption(const std::string& op) const;
+ bool IsOn(const std::string& op) const;
std::string GetComponentName(cmCPackComponent *component);
@@ -112,7 +113,8 @@ public: // Internal implementation
int ConfigureFromOptions();
int ConfigureFromComponent(cmCPackComponent *component);
- int ConfigureFromComponentGroup(cmCPackComponentGroup *group);
+ int ConfigureFromGroup(cmCPackComponentGroup *group);
+ int ConfigureFromGroup(const std::string &groupName);
void GeneratePackageFile();
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 109905c..06fcb75 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -1479,8 +1479,10 @@ int cmCTestSubmitHandler::ProcessHandler()
//----------------------------------------------------------------------------
std::string cmCTestSubmitHandler::GetSubmitResultsPrefix()
{
+ std::string buildname = cmCTest::SafeBuildIdField(
+ this->CTest->GetCTestConfiguration("BuildName"));
std::string name = this->CTest->GetCTestConfiguration("Site") +
- "___" + this->CTest->GetCTestConfiguration("BuildName") +
+ "___" + buildname +
"___" + this->CTest->GetCurrentTag() + "-" +
this->CTest->GetTestModelString() + "___XML___";
return name;
diff --git a/Source/CTest/cmCTestUpdateCommand.cxx b/Source/CTest/cmCTestUpdateCommand.cxx
index 5408a8a..f87466d 100644
--- a/Source/CTest/cmCTestUpdateCommand.cxx
+++ b/Source/CTest/cmCTestUpdateCommand.cxx
@@ -56,6 +56,8 @@ cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler()
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"GITUpdateCustom", "CTEST_GIT_UPDATE_CUSTOM");
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
+ "UpdateVersionOnly", "CTEST_UPDATE_VERSION_ONLY");
+ this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"HGCommand", "CTEST_HG_COMMAND");
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"HGUpdateOptions", "CTEST_HG_UPDATE_OPTIONS");
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx
index fda61ea..68f5fe1 100644
--- a/Source/CTest/cmCTestUpdateHandler.cxx
+++ b/Source/CTest/cmCTestUpdateHandler.cxx
@@ -258,12 +258,13 @@ int cmCTestUpdateHandler::ProcessHandler()
double elapsed_time_start = cmSystemTools::GetTime();
bool updated = vc->Update();
-
+ std::string buildname = cmCTest::SafeBuildIdField(
+ this->CTest->GetCTestConfiguration("BuildName"));
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
<< "<Update mode=\"Client\" Generator=\"ctest-"
<< cmVersion::GetCMakeVersion() << "\">\n"
<< "\t<Site>" << this->CTest->GetCTestConfiguration("Site") << "</Site>\n"
- << "\t<BuildName>" << this->CTest->GetCTestConfiguration("BuildName")
+ << "\t<BuildName>" << buildname
<< "</BuildName>\n"
<< "\t<BuildStamp>" << this->CTest->GetCurrentTag() << "-"
<< this->CTest->GetTestModelString() << "</BuildStamp>" << std::endl;
diff --git a/Source/CTest/cmCTestUploadHandler.cxx b/Source/CTest/cmCTestUploadHandler.cxx
index 4c3f81b..e33c387 100644
--- a/Source/CTest/cmCTestUploadHandler.cxx
+++ b/Source/CTest/cmCTestUploadHandler.cxx
@@ -44,14 +44,15 @@ int cmCTestUploadHandler::ProcessHandler()
"Cannot open Upload.xml file" << std::endl);
return -1;
}
-
+ std::string buildname = cmCTest::SafeBuildIdField(
+ this->CTest->GetCTestConfiguration("BuildName"));
cmCTest::SetOfStrings::const_iterator it;
ofs << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
<< "<?xml-stylesheet type=\"text/xsl\" "
"href=\"Dart/Source/Server/XSL/Build.xsl "
"<file:///Dart/Source/Server/XSL/Build.xsl> \"?>\n"
<< "<Site BuildName=\""
- << this->CTest->GetCTestConfiguration("BuildName")
+ << buildname
<< "\" BuildStamp=\""
<< this->CTest->GetCurrentTag() << "-"
<< this->CTest->GetTestModelString() << "\" Name=\""
diff --git a/Source/CTest/cmCTestVC.cxx b/Source/CTest/cmCTestVC.cxx
index f89fa2b..15f796f 100644
--- a/Source/CTest/cmCTestVC.cxx
+++ b/Source/CTest/cmCTestVC.cxx
@@ -166,10 +166,17 @@ void cmCTestVC::CleanupImpl()
//----------------------------------------------------------------------------
bool cmCTestVC::Update()
{
- this->NoteOldRevision();
- this->Log << "--- Begin Update ---\n";
- bool result = this->UpdateImpl();
- this->Log << "--- End Update ---\n";
+ bool result = true;
+ // if update version only is on then do not actually update,
+ // just note the current version and finish
+ if(!cmSystemTools::IsOn(
+ this->CTest->GetCTestConfiguration("UpdateVersionOnly").c_str()))
+ {
+ this->NoteOldRevision();
+ this->Log << "--- Begin Update ---\n";
+ result = this->UpdateImpl();
+ this->Log << "--- End Update ---\n";
+ }
this->NoteNewRevision();
return result;
}
diff --git a/Source/CTest/cmParseMumpsCoverage.cxx b/Source/CTest/cmParseMumpsCoverage.cxx
index 6236211..225e704 100644
--- a/Source/CTest/cmParseMumpsCoverage.cxx
+++ b/Source/CTest/cmParseMumpsCoverage.cxx
@@ -96,11 +96,13 @@ void cmParseMumpsCoverage::InitializeMumpsFile(std::string& file)
}
if(found)
{
- // (2) If the first character found above is whitespace then continue the
- // search for the first following non-whitespace character.
+ // (2) If the first character found above is whitespace or a period
+ // then continue the search for the first following non-whitespace
+ // character.
if(line[i] == ' ' || line[i] == '\t')
{
- while(i < line.size() && (line[i] == ' ' || line[i] == '\t'))
+ while(i < line.size() && (line[i] == ' ' || line[i] == '\t'
+ || line[i] == '.'))
{
i++;
}
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 8a37797..0574681 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -756,6 +756,9 @@ bool CMakeSetupDialog::setupFirstConfigure()
QString systemName = dialog.getSystemName();
m->insertProperty(QCMakeProperty::STRING, "CMAKE_SYSTEM_NAME",
tr("CMake System Name"), systemName, false);
+ QString systemVersion = dialog.getSystemVersion();
+ m->insertProperty(QCMakeProperty::STRING, "CMAKE_SYSTEM_VERSION",
+ tr("CMake System Version"), systemVersion, false);
QString cxxCompiler = dialog.getCXXCompiler();
m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_CXX_COMPILER",
tr("CXX compiler."), cxxCompiler, false);
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index b28f3b5..a7905a4 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -488,9 +488,11 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
{
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
cmCTestLog(this, OUTPUT,
- " Site: " << this->GetCTestConfiguration("Site") << std::endl
- << " Build name: " << this->GetCTestConfiguration("BuildName")
- << std::endl);
+ " Site: " << this->GetCTestConfiguration("Site") << std::endl
+ << " Build name: "
+ << cmCTest::SafeBuildIdField(
+ this->GetCTestConfiguration("BuildName"))
+ << std::endl);
cmCTestLog(this, DEBUG, "Produce XML is on" << std::endl);
if ( this->TestModel == cmCTest::NIGHTLY &&
this->GetCTestConfiguration("NightlyStartTime").empty() )
@@ -1441,7 +1443,7 @@ std::string cmCTest::SafeBuildIdField(const std::string& value)
// Disallow non-filename and non-space whitespace characters.
// If they occur, replace them with ""
//
- const char *disallowed = "\\/:*?\"<>|\n\r\t\f\v";
+ const char *disallowed = "\\:*?\"<>|\n\r\t\f\v";
if (safevalue.find_first_of(disallowed) != value.npos)
{
@@ -1582,12 +1584,14 @@ void cmCTest::EndXML(std::ostream& ostr)
int cmCTest::GenerateCTestNotesOutput(std::ostream& os,
const cmCTest::VectorOfStrings& files)
{
+ std::string buildname = cmCTest::SafeBuildIdField(
+ this->GetCTestConfiguration("BuildName"));
cmCTest::VectorOfStrings::const_iterator it;
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
<< "<?xml-stylesheet type=\"text/xsl\" "
"href=\"Dart/Source/Server/XSL/Build.xsl "
"<file:///Dart/Source/Server/XSL/Build.xsl> \"?>\n"
- << "<Site BuildName=\"" << this->GetCTestConfiguration("BuildName")
+ << "<Site BuildName=\"" << buildname
<< "\" BuildStamp=\""
<< this->CurrentTag << "-" << this->GetTestModelString() << "\" Name=\""
<< this->GetCTestConfiguration("Site") << "\" Generator=\"ctest"
diff --git a/Source/cmListFileLexer.c b/Source/cmListFileLexer.c
index bfa388e..af4fc3d 100644
--- a/Source/cmListFileLexer.c
+++ b/Source/cmListFileLexer.c
@@ -369,8 +369,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
-#define YY_NUM_RULES 23
-#define YY_END_OF_BUFFER 24
+#define YY_NUM_RULES 24
+#define YY_END_OF_BUFFER 25
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -381,10 +381,10 @@ struct yy_trans_info
static yyconst flex_int16_t yy_accept[77] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 4, 4,
- 24, 13, 21, 1, 15, 3, 13, 5, 6, 7,
- 22, 22, 16, 18, 19, 20, 10, 11, 8, 12,
- 9, 4, 13, 0, 13, 0, 21, 0, 0, 7,
- 13, 0, 13, 0, 2, 0, 13, 16, 0, 17,
+ 25, 13, 22, 1, 16, 3, 13, 5, 6, 7,
+ 15, 23, 17, 19, 20, 21, 10, 11, 8, 12,
+ 9, 4, 13, 0, 13, 0, 22, 0, 0, 7,
+ 13, 0, 13, 0, 2, 0, 13, 17, 0, 18,
10, 8, 4, 0, 14, 0, 0, 0, 0, 14,
0, 0, 14, 0, 0, 0, 2, 14, 0, 0,
0, 0, 0, 0, 0, 0
@@ -523,10 +523,10 @@ static yyconst flex_int16_t yy_chk[253] =
} ;
/* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[24] =
+static yyconst flex_int32_t yy_rule_can_match_eol[25] =
{ 0,
-1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0,
- 0, 0, 0, 0, };
+1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1,
+ 0, 0, 0, 0, 0, };
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -615,7 +615,7 @@ static void cmListFileLexerDestroy(cmListFileLexer* lexer);
-#line 621 "cmListFileLexer.c"
+#line 628 "cmListFileLexer.c"
#define INITIAL 0
#define STRING 1
@@ -850,7 +850,7 @@ YY_DECL
#line 91 "cmListFileLexer.in.l"
-#line 858 "cmListFileLexer.c"
+#line 865 "cmListFileLexer.c"
if ( !yyg->yy_init )
{
@@ -1111,75 +1111,84 @@ case 15:
YY_RULE_SETUP
#line 215 "cmListFileLexer.in.l"
{
+ lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted;
+ cmListFileLexerSetToken(lexer, yytext, yyleng);
+ lexer->column += yyleng;
+ return 1;
+}
+case 16:
+YY_RULE_SETUP
+#line 222 "cmListFileLexer.in.l"
+{
lexer->token.type = cmListFileLexer_Token_ArgumentQuoted;
cmListFileLexerSetToken(lexer, "", 0);
lexer->column += yyleng;
BEGIN(STRING);
}
YY_BREAK
-case 16:
+case 17:
YY_RULE_SETUP
-#line 222 "cmListFileLexer.in.l"
+#line 229 "cmListFileLexer.in.l"
{
cmListFileLexerAppend(lexer, yytext, yyleng);
lexer->column += yyleng;
}
YY_BREAK
-case 17:
-/* rule 17 can match eol */
+case 18:
+/* rule 18 can match eol */
YY_RULE_SETUP
-#line 227 "cmListFileLexer.in.l"
+#line 234 "cmListFileLexer.in.l"
{
/* Continuation: text is not part of string */
++lexer->line;
lexer->column = 1;
}
YY_BREAK
-case 18:
-/* rule 18 can match eol */
+case 19:
+/* rule 19 can match eol */
YY_RULE_SETUP
-#line 233 "cmListFileLexer.in.l"
+#line 240 "cmListFileLexer.in.l"
{
cmListFileLexerAppend(lexer, yytext, yyleng);
++lexer->line;
lexer->column = 1;
}
YY_BREAK
-case 19:
+case 20:
YY_RULE_SETUP
-#line 239 "cmListFileLexer.in.l"
+#line 246 "cmListFileLexer.in.l"
{
lexer->column += yyleng;
BEGIN(INITIAL);
return 1;
}
-case 20:
+case 21:
YY_RULE_SETUP
-#line 245 "cmListFileLexer.in.l"
+#line 252 "cmListFileLexer.in.l"
{
cmListFileLexerAppend(lexer, yytext, yyleng);
lexer->column += yyleng;
}
YY_BREAK
case YY_STATE_EOF(STRING):
-#line 250 "cmListFileLexer.in.l"
+#line 257 "cmListFileLexer.in.l"
{
lexer->token.type = cmListFileLexer_Token_BadString;
BEGIN(INITIAL);
return 1;
}
-case 21:
+case 22:
YY_RULE_SETUP
-#line 256 "cmListFileLexer.in.l"
+#line 263 "cmListFileLexer.in.l"
{
lexer->token.type = cmListFileLexer_Token_Space;
cmListFileLexerSetToken(lexer, yytext, yyleng);
lexer->column += yyleng;
return 1;
}
-case 22:
+case 23:
YY_RULE_SETUP
-#line 263 "cmListFileLexer.in.l"
+#line 270 "cmListFileLexer.in.l"
{
lexer->token.type = cmListFileLexer_Token_BadCharacter;
cmListFileLexerSetToken(lexer, yytext, yyleng);
@@ -1188,18 +1197,18 @@ YY_RULE_SETUP
}
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(COMMENT):
-#line 270 "cmListFileLexer.in.l"
+#line 277 "cmListFileLexer.in.l"
{
lexer->token.type = cmListFileLexer_Token_None;
cmListFileLexerSetToken(lexer, 0, 0);
return 0;
}
-case 23:
+case 24:
YY_RULE_SETUP
-#line 276 "cmListFileLexer.in.l"
+#line 283 "cmListFileLexer.in.l"
ECHO;
YY_BREAK
-#line 1220 "cmListFileLexer.c"
+#line 1238 "cmListFileLexer.c"
case YY_END_OF_BUFFER:
{
@@ -2320,7 +2329,7 @@ void cmListFileLexer_yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 276 "cmListFileLexer.in.l"
+#line 282 "cmListFileLexer.in.l"
diff --git a/Source/cmListFileLexer.in.l b/Source/cmListFileLexer.in.l
index ed4bf6b..a520c72 100644
--- a/Source/cmListFileLexer.in.l
+++ b/Source/cmListFileLexer.in.l
@@ -212,6 +212,13 @@ LEGACY {MAKEVAR}|{UNQUOTED}|\"({MAKEVAR}|{UNQUOTED}|[ \t[=])*\"
return 1;
}
+\[ {
+ lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted;
+ cmListFileLexerSetToken(lexer, yytext, yyleng);
+ lexer->column += yyleng;
+ return 1;
+}
+
\" {
lexer->token.type = cmListFileLexer_Token_ArgumentQuoted;
cmListFileLexerSetToken(lexer, "", 0);
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 758c8e4..7849d12 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -361,9 +361,13 @@ void cmMakefileTargetGenerator::WriteTargetLanguageFlags()
for(std::set<std::string>::const_iterator l = languages.begin();
l != languages.end(); ++l)
{
- *this->FlagFileStream << *l << "_FLAGS = " << this->GetFlags(*l) << "\n\n";
- *this->FlagFileStream << *l << "_DEFINES = " << this->GetDefines(*l) <<
- "\n\n";
+ std::string flags = this->GetFlags(*l);
+ std::string defines = this->GetDefines(*l);
+ // Escape comment characters so they do not terminate assignment.
+ cmSystemTools::ReplaceString(flags, "#", "\\#");
+ cmSystemTools::ReplaceString(defines, "#", "\\#");
+ *this->FlagFileStream << *l << "_FLAGS = " << flags << "\n\n";
+ *this->FlagFileStream << *l << "_DEFINES = " << defines << "\n\n";
}
}
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index b9295e4..09a9252 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1044,12 +1044,24 @@ void cmVisualStudio10TargetGenerator::WriteHeaderSource(cmSourceFile const* sf)
void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
{
+ bool toolHasSettings = false;
std::string tool = "None";
+ std::string shaderType;
std::string const& ext = sf->GetExtension();
if(ext == "appxmanifest")
{
tool = "AppxManifest";
}
+ else if(ext == "hlsl")
+ {
+ tool = "FXCompile";
+ // Figure out the type of shader compiler to use.
+ if(const char* st = sf->GetProperty("VS_SHADER_TYPE"))
+ {
+ shaderType = st;
+ toolHasSettings = true;
+ }
+ }
else if(ext == "jpg" ||
ext == "png")
{
@@ -1059,7 +1071,64 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
{
tool = "XML";
}
- this->WriteSource(tool, sf);
+
+ std::string deployContent;
+ if(this->GlobalGenerator->TargetsWindowsPhone() ||
+ this->GlobalGenerator->TargetsWindowsStore())
+ {
+ const char* content = sf->GetProperty("VS_DEPLOYMENT_CONTENT");
+ if(content && *content)
+ {
+ toolHasSettings = true;
+ deployContent = content;
+ }
+ }
+
+ if(toolHasSettings)
+ {
+ this->WriteSource(tool, sf, ">\n");
+
+ if(!deployContent.empty())
+ {
+ std::vector<std::string> const* configs =
+ this->GlobalGenerator->GetConfigurations();
+ cmGeneratorExpression ge;
+ cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
+ ge.Parse(deployContent);
+ for(size_t i = 0; i != configs->size(); ++i)
+ {
+ if(0 == strcmp(cge->Evaluate(this->Makefile, (*configs)[i]), "1"))
+ {
+ this->WriteString("<DeploymentContent Condition=\""
+ "'$(Configuration)|$(Platform)'=='", 3);
+ (*this->BuildFileStream) << (*configs)[i] << "|"
+ << this->Platform << "'\">true";
+ this->WriteString("</DeploymentContent>\n", 0);
+ }
+ else
+ {
+ this->WriteString("<ExcludedFromBuild Condition=\""
+ "'$(Configuration)|$(Platform)'=='", 3);
+ (*this->BuildFileStream) << (*configs)[i] << "|"
+ << this->Platform << "'\">true";
+ this->WriteString("</ExcludedFromBuild>\n", 0);
+ }
+ }
+ }
+ if(!shaderType.empty())
+ {
+ this->WriteString("<ShaderType>", 3);
+ (*this->BuildFileStream) << cmVS10EscapeXML(shaderType)
+ << "</ShaderType>\n";
+ }
+
+ this->WriteString("</", 2);
+ (*this->BuildFileStream) << tool << ">\n";
+ }
+ else
+ {
+ this->WriteSource(tool, sf);
+ }
}
void cmVisualStudio10TargetGenerator::WriteSource(