[cmake-developers] [CMake 0015522]: CPack config file ignored if relative

2015-04-18 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://public.kitware.com/Bug/view.php?id=15522 
== 
Reported By:Stephen Kelly
Assigned To:
== 
Project:CMake
Issue ID:   15522
Category:   CPack
Reproducibility:have not tried
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2015-04-18 15:29 CEST
Last Modified:  2015-04-18 15:29 CEST
== 
Summary:CPack config file ignored if relative
Description: 

A simple CMakeLists file:

 cmake_minimum_required(VERSION 2.8)
 project(cmaketest CXX)

 set(CPACK_PROJECT_CONFIG_FILE MyCPack.cmake)
 include(CPack)

The MyCPack.cmake file is not found in the source dir unless I change the line
to 

 set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_SOURCE_DIR}/MyCPack.cmake)


== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2015-04-18 15:29 Stephen Kelly  New Issue
==

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake 0011944]: CPackDeb: Support dependencies between components/Debian packages

2015-04-18 Thread Raffi Enficiaud

Le 18/04/15 09:34, Domen Vrankar a écrit :

I added the following functionalities:
- set the permissions of the md5sum to RW-R--R--, because lintian
complains
- added an option to set the shlibdeps per component
- added an option to set the dependencies per component
- added an option to set the description per component


The way you implemented it you are not covering the case:
1) CPACK_DEBIAN_PACKAGE_DESCRIPTION no set
2) CPACK_DEBIAN_PACKAGE_DESCRIPTION is set with component description
3) next component doesn't set per component description so
CPACK_DEBIAN_PACKAGE_DESCRIPTION is not reset and description of the
previous component is used

Or if 1) would be set and 3 not set you would loose the initial description


Ok. I worked essentially on having the tests kind of functional. I will 
add the cases you mentioned in new tests.




There is a simple solution for variables overflowing between
components - just wrap the entire code into a function (see CPackRPM
cpack_rpm_generate_package() function) - since such a change messes up
the entire diff (indentations) this should be an entirely separate
patch. This solution would also simplify the shlibdeps patch since you
would no longer need to set CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS to empty
value and unset it when you no longer need it.


Ok, I will try.




- enforcing the lower case policy of Debian for package names (in the
file, due to the comment # debian policy enforce lower case for package
name)


Since you are fixing multiple non related issues at the same time
please split the patch into separate commits so that it can easier be
seen which change fixes which issue.


Ok.



You are also leaving trailing whitespaces in patches - those should be removed.


I will clean the code, yes.




On the other hand, I started writing tests based on the one existing for
the CPackComponentsAll, but specific to debian packages:
- added a function for running lintian and checking for some errors. The
md5sum permission change is now covered by that
- added a function for running dpkg-deb and extracting a particular
field of the package metadata. No change I made are currently covered by
this function, this is what I will do next.
- Having one specific check file per configuration, sharing a common
.cmake providing the check functions (linitian and dpkg-deb). This would
prevent the cluttering of the checks that we can observe in the
CPackComponentsAll final test.


I already wrote to the mailing list regarding changing where and how
CPack test should be written but it will take me a few days to
implement... Since you are already splitting tests into separate
scripts it will be easy to move them later on.


I hope so. The added value in the tests I wrote so far is the 
possibility to inspect the generated packages with the Debian tools, and 
some refactoring (I found difficult to have several config files and one 
check file for all generators).






Sorry that was too quick. Here are the open questions:
- if a component depends on another component, should we add the dependency
automatically?


I'd say no by default so that we don't break back compatibility
unnecessarily but the feature should be enabled through a variable
(e.g. CPACK_DEBIAN_COMPONENTS_AUTODEPEND ON - and also per component
version).


I agree with that.




- What about the version of this dependency?

Let's say I have components A and B, and B depends on A. I am at version X.
Dependencies of A are d11, d12, d1N,
Dependencies of B are d21, d22, d2P

Should the generation of the package B include d2(P+1)= A (= versionX) ?


For the first patch I would omit versions of dependencies. Later this
can be added with additional possibility to change = to = for adding
minimal required version (e.g.
CPACK_DEBIAN_COMPONENT_name_DEPENDS_dependency some_version) with
the possibility to enable/disable version addition.


Good.

Raffi.


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] Generating buildsystem metadata from CMake

2015-04-18 Thread Stephen Kelly
Stephen Kelly wrote:

 The aim is to generate a structured file containing metadata relating the
 buildsystem.


I've been quiet on this thread for a while, so I think it is time for an 
update.

I became more ambitious in mid March and started prototyping a more-complete 
design for CMake IDE integration. 

Instead of teaching CMake to generate a metadata file, I want to add a 
server mode to CMake, so that IDEs can run the server in the build directory 
and query it for buildsystem metadata, code completion, etc. It can be 
implemented efficiently and it doesn't have to re-configure the build from 
the beginning each time. A lot of things become possible with such a design, 
but I'm being economic with details because I don't want to make promises I 
don't deliver in the end, even though I have high confidence that I actually 
can :).

The good news is that I have done some proof of concept work on all aspects 
of this, but I don't yet have one branch which contains all of the 
individual proof of concepts combined. Doing this properly requires 
refactoring CMake quite a bit, which I've already been doing for a while to 
create a cmState class.

The bad news is that because this is more ambitious, it will take more time 
and will not be part of the CMake 3.3 release early this summer. I do 
believe it can be implemented for the following release 3 months later 
though.

Here's some prior art in other tools:

 http://thread.gmane.org/gmane.comp.compilers.clang.devel/21780
 https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI.html
 http://thread.gmane.org/gmane.comp.lib.boost.build/26905

We can use JSON as the wire protocol, and we can talk about exactly what the 
protocol will be once the refactoring of CMake is done (that will take some 
more weeks). I'll post a more complete design proposal and my prototype at 
that point too.

Thanks,

Steve.


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers