[Cmake-commits] [cmake-commits] hoffman committed cmListCommand.cxx 1.18.2.1 1.18.2.2 cmLocalVisualStudio6Generator.cxx 1.141 1.141.2.1 cmMakefileTargetGenerator.cxx 1.93.2.2 1.93.2.3 cmPolicies.cxx 1.20.2.4 1.20.2.5 cmPolicies.h 1.10.2.2 1.10.2.3
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Apr 22 22:05:42 EDT 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv12362/Source
Modified Files:
Tag: CMake-2-6
cmListCommand.cxx cmLocalVisualStudio6Generator.cxx
cmMakefileTargetGenerator.cxx cmPolicies.cxx cmPolicies.h
Log Message:
ENH: merge into main tree
Index: cmListCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmListCommand.cxx,v
retrieving revision 1.18.2.1
retrieving revision 1.18.2.2
diff -C 2 -d -r1.18.2.1 -r1.18.2.2
*** cmListCommand.cxx 18 Mar 2008 14:23:54 -0000 1.18.2.1
--- cmListCommand.cxx 23 Apr 2008 02:05:39 -0000 1.18.2.2
***************
*** 104,109 ****
return false;
}
! // expand the variable
! cmSystemTools::ExpandListArgument(listString, list);
return true;
}
--- 104,163 ----
return false;
}
! // expand the variable into a list
! cmSystemTools::ExpandListArgument(listString, list, true);
! // check the list for empty values
! bool hasEmpty = false;
! for(std::vector<std::string>::iterator i = list.begin();
! i != list.end(); ++i)
! {
! if(i->size() == 0)
! {
! hasEmpty = true;
! break;
! }
! }
! // if no empty elements then just return
! if(!hasEmpty)
! {
! return true;
! }
! // if we have empty elements we need to check policy CMP0007
! switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0007))
! {
! case cmPolicies::WARN:
! {
! // Default is to warn and use old behavior
! // OLD behavior is to allow compatibility, so recall
! // ExpandListArgument without the true which will remove
! // empty values
! list.clear();
! cmSystemTools::ExpandListArgument(listString, list);
! std::string warn = this->Makefile->GetPolicies()->
! GetPolicyWarning(cmPolicies::CMP0007);
! warn += " List has value = [";
! warn += listString;
! warn += "].";
! this->Makefile->IssueMessage(cmake::AUTHOR_WARNING,
! warn);
! return true;
! }
! case cmPolicies::OLD:
! // OLD behavior is to allow compatibility, so recall
! // ExpandListArgument without the true which will remove
! // empty values
! list.clear();
! cmSystemTools::ExpandListArgument(listString, list);
! return true;
! case cmPolicies::NEW:
! return true;
! case cmPolicies::REQUIRED_IF_USED:
! case cmPolicies::REQUIRED_ALWAYS:
! this->Makefile->IssueMessage(
! cmake::FATAL_ERROR,
! this->Makefile->GetPolicies()
! ->GetRequiredPolicyError(cmPolicies::CMP0007)
! );
! return false;
! }
return true;
}
Index: cmPolicies.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.h,v
retrieving revision 1.10.2.2
retrieving revision 1.10.2.3
diff -C 2 -d -r1.10.2.2 -r1.10.2.3
*** cmPolicies.h 21 Apr 2008 00:44:52 -0000 1.10.2.2
--- cmPolicies.h 23 Apr 2008 02:05:40 -0000 1.10.2.3
***************
*** 48,51 ****
--- 48,52 ----
CMP0005, // Definition value escaping
CMP0006, // BUNDLE install rules needed for MACOSX_BUNDLE targets
+ CMP0007, // list command handling of empty elements
// Always the last entry. Useful mostly to avoid adding a comma
Index: cmPolicies.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.cxx,v
retrieving revision 1.20.2.4
retrieving revision 1.20.2.5
diff -C 2 -d -r1.20.2.4 -r1.20.2.5
*** cmPolicies.cxx 21 Apr 2008 00:44:52 -0000 1.20.2.4
--- cmPolicies.cxx 23 Apr 2008 02:05:40 -0000 1.20.2.5
***************
*** 270,273 ****
--- 270,285 ----
"target is installed without a BUNDLE DESTINATION.",
2,6,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0007, "CMP0007",
+ "list command no longer ignores empty elements.",
+ "This policy determines whether the list command will "
+ "ignore empty elements in the list. "
+ "CMake 2.4 and below list commands ignored all empty elements"
+ " in the list. For example, a;b;;c would have length 3 and not 4. "
+ "The OLD behavior for this policy is to ignore empty list elements. "
+ "The NEW behavior for this policy is to correctly count empty "
+ "elements in a list. ",
+ 2,6,0, cmPolicies::WARN);
}
Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.93.2.2
retrieving revision 1.93.2.3
diff -C 2 -d -r1.93.2.2 -r1.93.2.3
*** cmMakefileTargetGenerator.cxx 21 Apr 2008 00:44:52 -0000 1.93.2.2
--- cmMakefileTargetGenerator.cxx 23 Apr 2008 02:05:40 -0000 1.93.2.3
***************
*** 492,497 ****
if(this->Target->GetProperty("COMPILE_FLAGS"))
{
! this->LocalGenerator->AppendFlags
! (flags, this->Target->GetProperty("COMPILE_FLAGS"));
}
--- 492,522 ----
if(this->Target->GetProperty("COMPILE_FLAGS"))
{
! std::string langIncludeExpr = "CMAKE_";
! langIncludeExpr += lang;
! langIncludeExpr += "_FLAG_REGEX";
! const char* regex = this->Makefile->
! GetDefinition(langIncludeExpr.c_str());
! if(regex)
! {
! cmsys::RegularExpression r(regex);
! std::vector<std::string> args;
! cmSystemTools::ParseWindowsCommandLine(
! this->Target->GetProperty("COMPILE_FLAGS"),
! args);
! for(std::vector<std::string>::iterator i = args.begin();
! i != args.end(); ++i)
! {
! if(r.find(i->c_str()))
! {
! this->LocalGenerator->AppendFlags
! (flags, i->c_str());
! }
! }
! }
! else
! {
! this->LocalGenerator->AppendFlags
! (flags, this->Target->GetProperty("COMPILE_FLAGS"));
! }
}
Index: cmLocalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v
retrieving revision 1.141
retrieving revision 1.141.2.1
diff -C 2 -d -r1.141 -r1.141.2.1
*** cmLocalVisualStudio6Generator.cxx 29 Jan 2008 22:30:34 -0000 1.141
--- cmLocalVisualStudio6Generator.cxx 23 Apr 2008 02:05:39 -0000 1.141.2.1
***************
*** 359,363 ****
// If the group is empty, don't write it at all.
! if(sourceFiles.empty())
{
return;
--- 359,363 ----
// If the group is empty, don't write it at all.
! if(sourceFiles.empty() && sg->GetGroupChildren().empty())
{
return;
More information about the Cmake-commits
mailing list