[cmake-developers] [CMake 0012129]: Add top level directory to component install

2011-04-27 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://public.kitware.com/Bug/view.php?id=12129 
== 
Reported By:Daniel Nelson
Assigned To:
== 
Project:CMake
Issue ID:   12129
Category:   CPack
Reproducibility:always
Severity:   feature
Priority:   normal
Status: new
== 
Date Submitted: 2011-04-27 15:12 EDT
Last Modified:  2011-04-27 15:12 EDT
== 
Summary:Add top level directory to component install
Description: 
When CPACK_ARCHIVE_COMPONENT_INSTALL is on, the packages do not contain a top
level directory, unlike with the non component install.  This is true even if
CPACK_INCLUDE_TOPLEVEL_DIRECTORY is enabled.

It would be nice if a top level directory could be added.  This would mirror the
behavior of the non component install and prevent an annoying surprise for
anyone untarring without listing the contents first.

I also think having this top level directory should be the default, since
CPACK_INCLUDE_TOPLEVEL_DIRECTORY=1 is the default for archives.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2011-04-27 15:12 Daniel Nelson  New Issue
==

___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Better Eclipse CDT support

2011-04-27 Thread Alexander Neundorf
On Monday 25 April 2011, Oliver Buchtala wrote:
 Am 20.04.2011 22:09, schrieb Alexander Neundorf:
  ...
 
  What would you expect there ?
 
  Some structure that gives me acces to the sources of the targets.
  I suppose, you try to achieve this with sub-projects, but it does not
  work properly in my case.
 
  How does it work not properly ?
  Don't you have project() calls or are they not created ?

 While creating a document on my generator implementation, I stumbled
 over the solution to this problem.

 [Subprojects] was empty in my setting because the generated link
 specifications have been invalid.
 Maybe, Eclipse CDT has changed here (?).

 You have to use 'locationURI' for virtual folders and 'location' for
 linked folders.
 I.e., specify a linked folder like that (in .cproject-file):

 ...
 linkedResources
 link
 name[Subprojects]/name
 type2/type
 locationURIvirtual:/virtual/locationURI
 /link
 link
 name[Subprojects]/LIBCURL/name
 type2/type
 locationD:/libraries/cmake-git/Utilities/cmcurl/location
 /link
 /linkedResources
 ...

Does the attached patch fix this for you ?

For me (Eclipse Helios under Linux) it doesn't make a difference.

Alex
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index c4ea425..8e26b8e 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -403,7 +403,7 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
   // for each sub project create a linked resource to the source dir
   // - only if it is an out-of-source build
   this-AppendLinkedResource(fout, [Subprojects],
- virtual:/virtual);
+ virtual:/virtual, true);
 
   for (std::mapcmStdString, std::vectorcmLocalGenerator* ::const_iterator
it = this-GlobalGenerator-GetProjectMap().begin();
@@ -1082,17 +1082,24 @@ void cmExtraEclipseCDT4Generator
 void cmExtraEclipseCDT4Generator
 ::AppendLinkedResource (cmGeneratedFileStream fout,
 const std::string name,
-const std::string path)
+const std::string path,
+bool isVirtualFolder)
 {
+  const char* locationTag = location;
+  if (isVirtualFolder) // ... and not a linked folder
+{
+locationTag = locationURI;
+}
+
   fout 
 \t\tlink\n
 \t\t\tname
  cmExtraEclipseCDT4Generator::EscapeForXML(name)
  /name\n
 \t\t\ttype2/type\n
-\t\t\tlocationURI
+\t\t\t  locationTag  
  cmExtraEclipseCDT4Generator::EscapeForXML(path)
- /locationURI\n
+ /  locationTag  \n
 \t\t/link\n
 ;
 }
diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h
index 99e69c4..a683731 100644
--- a/Source/cmExtraEclipseCDT4Generator.h
+++ b/Source/cmExtraEclipseCDT4Generator.h
@@ -87,7 +87,8 @@ private:
 
   static void AppendLinkedResource (cmGeneratedFileStream fout,
 const std::string name,
-const std::string path);
+const std::string path,
+bool isVirtualFolder = false);
 
   bool AppendOutLinkedResource(cmGeneratedFileStream fout,
const std::string defname,
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Better Eclipse CDT support

2011-04-27 Thread Oliver Buchtala
Am 27.04.2011 21:28, schrieb Alexander Neundorf:
 On Monday 25 April 2011, Oliver Buchtala wrote:
 Am 20.04.2011 22:09, schrieb Alexander Neundorf:
 ...

 What would you expect there ?
 Some structure that gives me acces to the sources of the targets.
 I suppose, you try to achieve this with sub-projects, but it does not
 work properly in my case.
 How does it work not properly ?
 Don't you have project() calls or are they not created ?
 While creating a document on my generator implementation, I stumbled
 over the solution to this problem.

 [Subprojects] was empty in my setting because the generated link
 specifications have been invalid.
 Maybe, Eclipse CDT has changed here (?).

 You have to use 'locationURI' for virtual folders and 'location' for
 linked folders.
 I.e., specify a linked folder like that (in .cproject-file):

 ...
 linkedResources
 link
 name[Subprojects]/name
 type2/type
 locationURIvirtual:/virtual/locationURI
 /link
 link
 name[Subprojects]/LIBCURL/name
 type2/type
 locationD:/libraries/cmake-git/Utilities/cmcurl/location
 /link
 /linkedResources
 ...
 Does the attached patch fix this for you ?

 For me (Eclipse Helios under Linux) it doesn't make a difference.

 Alex
Yep.  This does under Windows as well.

Bye,
Oliver
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers